0

我的课看起来像这样:

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”,它可以正常工作,我应该怎么做才能修复它?我确实需要里面的日期。

坦率

4

1 回答 1

0

它有一个未解决的问题,但我不太明白它应该在一年前修复。我已经解决了这个错误,如果发生任何事情,我会重新编辑我的答案。

于 2010-06-13T10:01:16.563 回答