Because your relationships are unowned (so the objects are in
different entity groups, right?), you wouldn't be able to save them
all in the same transaction anyway.

So you're right: you'll have to save them, which means multiple
transactions, and if one of them fails you'll have inconsistent data.

On Sep 19, 8:47 am, mlenormand <[email protected]> wrote:
> Hi Everybody,
>
> Here's my problem with JDO and unowned relationships :
>
> I have several entities of the same kind that are organized in a
> hierarchical way, maintained with unowned relationships.
> JDO can generate keys for my entities when they are written to the
> datastore, but with this option, I can't know my entity's keys until
> they are saved to the datastore. If I want to make a reference to an
> entity A from an entity B, it seems to be impossible because at this
> time I don't know A's key, that will be generated when transaction is
> committed.
>
> One solution would be to use several transactions, each one would
> persist an entity, but it's not good because I want to persist all the
> entities in the same transaction.
>
> I know that defining keys myself could solve the problem, but maybe
> there is an other solution that would be better ?
>
> Thank you for your help. And thank you to the GAE team for the
> fantastic work you did !
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to