forcedotcom/java-sdk — Issue #18: force.com/jdk
Author: vkanteti
Created: 2012-03-07 03:40:56+00:00
State: open

Problem - I created java entities using maven for force.com objects. When I try to use entities it shows fields type mismatches Geogerian calendar/Boolean types. In case if I comment all the fields it still shows

java.lang.IllegalArgumentException: out of field index :7
at com.force.sdk.jpa.model.BaseForceObject.jdoReplaceField(BaseForceObject.java)

I'm using following version:

1.6
3.0.5.RELEASE
1.6.9
1.6.1
22.0.7-BETA
UTF-8

javax.jdo
jdo2-api
2.3-eb

My entity code:
@javax.annotation.Generated(value="com.force.sdk.codegen.ForceJPAClassGenerator")
@Table(name="detail__c")
@Entity(name="Detail")
@com.force.sdk.jpa.annotation.CustomObject(readOnlySchema=true)
public class Detail extends com.force.sdk.jpa.model.BaseForceCustomObject {

public static final String KEY_PREFIX = "a17";
protected User createdBy;
protected User lastModifiedBy;
protected Event eventId;
protected Account studentAccountId;
protected java.util.Calendar lastExecutionDate;
protected boolean sloan;

@ManyToOne
@Basic(fetch=FetchType.LAZY)
@Column(name="LastModifiedById")
public User getLastModifiedBy() {
return this.lastModifiedBy;
}

public void setLastModifiedBy(User lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}

@ManyToOne
@Basic(fetch=FetchType.LAZY)
@Column(name="event_id__c")
public Event getEventId() {
return this.eventId;
}

@Basic(optional=false)
public void setEventId(Event eventId) {
this.eventId = eventId;
}

@ManyToOne
@Basic(fetch=FetchType.LAZY)
@Column(name="student_account_id__c")
public Account getStudentAccountId() {
return this.studentAccountId;
}

@Basic(optional=false)
public void setStudentAccountId(Account studentAccountId) {
this.studentAccountId = studentAccountId;
}

@Temporal(TemporalType.TIMESTAMP)
@Column(name="last_execution_date__c")
public java.util.Calendar getLastExecutionDate() {
return this.lastExecutionDate;
}

public void setLastExecutionDate(java.util.Calendar lastExecutionDate) {
this.lastExecutionDate = lastExecutionDate;
}
@Column(name="sloan__c")
public boolean getSloan() {
return this.sloan;
}

public void setSloan(boolean sloan) {
this.sloan = sloan;
}

}

Please someone help me with this.