On 5 Jul 2010, at 14:44, MArtin Schumacher wrote:
i.e. in my example I have two associations between Person and ContactData. One holds all ContactData of a Person, the other marks the registrationData. The registrationData is included in all ContactData. As I learned, I cannot use a field of type ContactData and List<ContactData>, instead I have to use Key and List<Key>. Ok. got it.
You might want to check out Twig which allows direct references for both owned and unowned relationships. No Keys required.
http://code.google.com/p/twig-persist/
Person and ContactData (until now just Email) works. Now I want to search a Person with a specific email-address as registrationData. As far as I understand, I cannot use queries with joins, right? How do I run such kind of queries? Do I have to search all Emails and than another query with the found email-Key? How do I delete a Person with all ContactData? Manually with foreach- blocks?
Twig allows collections of ContactData to be embedded in the same entity as the owning Person. Then you can do a query without the need for a join. It also obviously takes care of deleting at the same time. This "embedded collection" feature is also supported by Objectify.
Overall I think this kind of data handling is not very handy. It throws us back to stoneage, because developers have to handle associations by their own...
which is why these alternatives exist. John -- 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-j...@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.