我的班级看起来像这样:
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class Contact_Info implements Serializable
{
@PrimaryKey
@Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
Long Id;
public static final long serialVersionUID=26362862L;
@Persistent
String Contact_Id="";
@Persistent
GregorianCalendar Date_1;
public Contact_Info() { }
public void setId(Long value) { Id=value; }
public Long getId() { return Id; }
public void setContact_Id(String value) { Contact_Id=value; }
public String getContact_Id() { return Contact_Id; }
public void setDate_1(GregorianCalendar value) { Date_1=value; }
public GregorianCalendar getDate_1() { return Date_1; }
public String toString() { return Contact_Id; }
}
当它运行时,我收到以下错误:
java.lang.UnsupportedOperationException org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.java:62) org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField(DatastoreFieldManager.java:839) org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java:1037) PayPal_Monitor.Contact_Info.jdoProvideField(Contact_Info.java) PayPal_Monitor.Contact_Info.jdoProvideFields(Contact_Info.java) org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl.java:2715) org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(DatastorePersistenceHandler.java:341) org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:251)
如果我拿出“GregorianCalendar Date_1”,它可以正常工作,我该怎么做才能修复它?我确实需要它的日期。
谢