define Cow as
class Cow {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
@Persistent
@Extension(vendorName=datanucleus, key=gae.parent-pk,
value=true)
private Key farmKey;
}
If you set farmKey to farm id then both farm and cow will
Thanks Andrey, that works perfectly. I wasn't understanding the
example in the docs about this:
http://code.google.com/appengine/docs/java/datastore/transactions.html
section titled Creating Entities With Entity Groups.
Your example makes it clear,
Thanks
On Apr 27, 6:04 am, ailinykh