Hi Martin, Both Twig and Objectify support embedded collections which often let you get away with no joins. For example you can query for Person with contact.phone == '828282828'. ContactDetails seem an ideal candidate to be embedded.

For your second example, you could denormalize your model to include the twittername in the Attendance record - unless the name might change. Otherwise it would be a simple case of doing a query for the twittername first and then the Attendances for the User Key.

Only if embedded collections is not flexible enough for you, and you need an AND query now, use the "zig-zag" method to join results in a stream - a Google search will turn up Google I/O videos that describe this. Avoid loading into memory if you can at all help it. To use the zig-zag join all queries must have the same sort order.

Right now Twig supports only OR joins that are streamed - not loaded into memory. The unreleased version 2.0 adds AND by zig-zag but there is no ETA on that yet.



On 8 Jul 2010, at 01:46, MArtin Schumacher wrote:

Hi John,

sorry for the delay.

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/

Great. It seams like Twig is exactly what I looked for.  Just I cannot
see how I can do joins.

i.e. in my model mentioned above, I want to select a Person with some
specific ContactData.

Or I want to find all Attendances for a User logged in with a specific
Twittername.

Do you have any further hints for me?

Martin

--
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-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.

Reply via email to