I supposed you used Long as the primary key in the owned/child entity? If true, that is not allowed and it has to be Key not Long.
Hth On Apr 26, 2011 5:49 PM, "Mike Prince" <m...@mikeprince.com> wrote: > I have a first entity MediaAlbum with a @Transient field that holds a List > of another entity Media. After querying for a list of MediaAlbum I get an > exception: > > Error in meta-data for > com.yumyumlabs.foundation.appengine.media.model.Media.id: Cannot have a > java.lang.Long primary key and be a child object (owning field is > com.yumyumlabs.foundation.appengine.media.model.MediaAlbum.media). > org.datanucleus.store.appengine.MetaDataValidator$DatastoreMetaDataException: > Error in meta-data for > com.yumyumlabs.foundation.appengine.media.model.Media.id: Cannot have a > java.lang.Long primary key and be a child object (owning field is > com.yumyumlabs.foundation.appengine.media.model.MediaAlbum.media). > at > org.datanucleus.store.appengine.MetaDataValidator.checkForIllegalChildField(MetaDataValidator.java:376) > > Once this exception has been raised I can no longer persist Media objects, > as calling persistence manager makePersistent silently fails and the Media > object I was trying to save does not have an id assigned and does not appear > to be in the datastore. > > If I kill the server and restart, I can continue creating Media objects > until I again try to list them and get the above exception, and then Media > cannot be persisted again. > > I'm running app engine 1.4.3. Any ideas? > > -- > 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 google-appengine-java@googlegroups.com. > To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group at http://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 google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.