Greetings

I am trying to figure out a best-practice for avoiding the use of
joins. So far, it isn't going too well so here I am asking if anyone
is up for sharing their experience or linking to the reference I
failed to find. :)

An example of my requirement is this:

We have two classes:

Person
-----------
+ listData
+ listPerson

Data
------------
+ person


The domain model is not set in stone, but merely to illustrate that a
Person somehow have a list of "Friends" in his listPerson attribute
and that he somehow have a list of his own data in the listData.

Now, getting the Data for a single Person is trivial.

But, getting the Data for a Persons friends is not.

I cannot get around somehow having to:

1) Fetch the Person (1 query)
2) Fetch all Person in listPerson (n queries per friend)
3) Fetch all Data by the list provided in 2) by combining all the
friends listData fields (1 query)

The problem is the (n queries) in step 2, which I belive would be a
killer and eventually be a deadend when people have more than 30
friends.

Any hints? :)

--

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