On 8 Apr 2010, at 13:51, Yasuo Higa wrote
Slim3 supports embedded collections as follows:
@Attribute(lob = true)
private List<EmbeddedChild> Children;
See
http://sites.google.com/site/slim3appengine/slim3-datastore/defining-data-classes/serializable-objects
Serializing is a bit different to embedding instances because the Blob
is opaque and not able to be queried. If you use @Embed in Twig or
Objectify you can query for all Container instances by filtering on an
embedded property.
e.g. "Find all Bands with Albums that have sold over a million copies"
class Band
{
@Embed List<Album> albums
}
class Album
{
String name;
int sold.
}
datastore.find()
.type(Band.class)
.addFilter("albums.sold", GREATER_THAN, 1000000)
.returnResultsNow();
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.