Hi Timofey, Any workaround without disturbing data store.
thanks On May 12, 1:46 pm, Timofey Koolin <[email protected]> wrote: > You can combine two fields in one string-field and use it as String PK > > On 11 май, 14:14, aptest1 actiprocess <[email protected]> wrote: > > > > > > > We are unable to use two fileds as the compisit primary keys in google > > datastore, its throwing follwing exception if we make two fields as > > primary key fileds.please help us to resolve this iusse > > > our company class has two primary keys as below, we are using > > companyId,docId as primary keys > > *************************************************************************** > > **************************** > > > @PersistenceCapable(identityType=IdentityType.DATASTORE) > > public class Company{ > > �...@primarykey > > @Persistent(valueStrategy = IdGeneratorStrategy.SEQUENCE) > > private Long companyId; > > @PrimaryKey > > String docId > > > } > > > if we start the server we are getting the following Exception : > > *************************************************************************** > > *****s > > May 11, 2010 10:07:31 AM > > org.datanucleus.metadata.AbstractClassMetaData determineObjectIdClass > > SEVERE: Class com.atp.smartstore.DB.config.User has application- > > identity and no objectid-class specified yet has 2 primary key fields. > > Unable to use SingleFieldIdentity. > > Class com.atp.smartstore.DB.config.User has application-identity and > > no objectid-class specified yet has 2 primary key fields. Unable to > > use SingleFieldIdentity. > > May 11, 2010 10:07:31 AM org.datanucleus.enhancer.DataNucleusEnhancer > > main > > SEVERE: DataNucleus Enhancer completed with an error. Please review > > the enhancer log for full details. Some classes may have been enhanced > > but some caused errors > > Class com.atp.smartstore.DB.config.User has application-identity and > > no objectid-class specified yet has 2 primary key fields. Unable to > > use SingleFieldIdentity. > > org.datanucleus.metadata.InvalidMetaDataException: Class > > com.atp.smartstore.DB.config.User has application-identity and no > > objectid-class specified yet has 2 primary key fields. Unable to use > > SingleFieldIdentity. > > at > > org.datanucleus.metadata.AbstractClassMetaData.determineObjectIdClass(Abstr > > actClassMetaData.java: > > 1032) > > at > > org.datanucleus.metadata.ClassMetaData.populate(ClassMetaData.java: > > 205) > > at org.datanucleus.metadata.MetaDataManager > > $1.run(MetaDataManager.java:2317) > > at java.security.AccessController.doPrivileged(Native Method) > > at > > org.datanucleus.metadata.MetaDataManager.populateAbstractClassMetaData(Meta > > DataManager.java: > > 2311) > > at > > org.datanucleus.metadata.MetaDataManager.populateFileMetaData(MetaDataManag > > er.java: > > 2148) > > at > > org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaD > > ataManager.java: > > 864) > > at > > org.datanucleus.metadata.MetaDataManager.loadClasses(MetaDataManager.java: > > 433) > > at > > org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNu > > cleusEnhancer.java: > > 743) > > at > > org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.ja > > va: > > 545) > > at > > org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java: > > 1252) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > > 39) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp > > l.java: > > 25) > > at java.lang.reflect.Method.invoke(Method.java:585) > > at > > com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java: > > 57) > > at com.google.appengine.tools.enhancer.Enhance.<init>(Enhance.java: > > 60) > > at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41) > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/google-appengine-java?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
