Hello Ian,

I tried changing the order of calls makePersistent. Now is:

makePersistent(user);
makePersistent(stat);

but still the same problem.

Thanks

Ian Marshall wrote:
Hello Patrizio,

I do not think that my brain could cope with the generation of the
encoded key myself. I would prefer to add the field like

  @Persistent
  @Extension(vendorName="datanucleus", key="gae.pk-name",
value="true")
  private String keyName;

and set that instead with a class-unique String, leaving encodedKey
null. This would let GAE/J do the work of ensuring that each
encodedKey is unique in BigTable!

User is the entity parent of Stat, and you set this relationship at
the parental side. Your code, I think, persists Stat before you have
set the relationship at the child side. So you are persisting Stat
with no entity group parent before you persist User.

Try to persist User first before persisting Stat. Since you have
already set the User's Stat, this might work... :)

Regards,

Ian


  

--

Patrizio Munzi
Product Specialist
Viale Bruno Buozzi, 19 - 00197 Roma (Italy)
tel: +39 06 4543 3540
fax: +39 06 4543 3587
mobile: +39 393 7195 164
mail: [email protected]
web: http://www.eris4.com
skype: eris4_munzi


--~--~---------~--~----~------------~-------~--~----~
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