[appengine-java] Re: Can only reference properties of a sub-object if the sub-object is embedded
Hello kidowell, It looks like you are trying to do som kind of *join like* sintax here, since you are trying to fetch parent Entities based on a property on the child ones (or vice-versa). In your case, the mapping is telling to the AppEngine underlying datastore to store the Key of the Annotation under the key of the AnnotationType. The AppEngine datastore is not a regular Relational datastore, and JDO/JPA don't work as you expect it to work if you are not familiar with this kind of datastore. I suggest you to read a bit more on the first chapters of the current documentation that explain how the datastore works, and then you may understand better how you will model your data to archive your queries. Also, i suggest you to consider using another persistence layer on your app so you can make better usage of the datastore resources. Currently, we are changing our live web app to Objectify, leaving all headheches that comes with JPA on AppEngine... Best Regards, -- 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.
[appengine-java] Re: Can only reference properties of a sub-object if the sub-object is embedded
You are serializing AnnotationType in your Annotation class rather than embedding it. You cannot query against a serialized object because it's stored in bytes rather than a queryable type. In order to query against this, you should change to: @Embedded private AnnotationType annotationType; At that point you can remove your serialization if you're not using it elsewhere: public class AnnotationType { -- 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.
[appengine-java] Re: Can only reference properties of a sub-object if the sub-object is embedded
Oops, my answer was assuming you are using Objectify, which you are not so my answer is probably not valid. However, I do believe your problem is due to the serialization. -- 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.