If you are not required to use JDO consider one of the GAE specific
persistence libraries. Both Twig and Objectify support embedding
collections of entities in a single "container" entity which gives the
ability to query using properties of the container or the contained.
I believe Twig is the only one that allows embedded items to be
polymorphic. For example:
class Farm
{
String city;
@Embed(polymorphic=true) List<Animal> animals;
}
class Goat implements Animal
{
int horns;
}
class Pig implements Animal
{
String favouriteFood;
}
then you can query for all farms in Wellington with a Pig that likes
cream buns
datastore.find().type(Farm.class)
.addFilter("city", EQUAL, "Wellington")
.addFilter("animals.favouriteFood", EQUAL, "Cream buns")
.returnResultsNow();
On 22 Jun 2010, at 09:17, Hariharan Anantharaman wrote:
Hi,
As per documentation, JDO does not support join queries over parent
and child entities(tables) in datastore. Are there any work arounds
to achieve the same? Is this possible with JPA?
Thanks
Hariharan
http://harianantha.in
--
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.