I haven't found a solution to my problem. I think I haven't correctly understood how persistance work with Google App Engine.
I stop using directly JPA, and now use twig-persist as persistance layer ( http://code.google.com/p/twig-persist/ ) On 9 déc, 01:11, david <[email protected]> wrote: > Hello, > > I got a simple relation between two object : > > @Entity > class Spot { > // .... > �...@onetoone(targetEntity = Pics.class, cascade = CascadeType.ALL, > fetch = FetchType.LAZY) > private Pics pics; > // ... > > } > > I have to update this relation by setting a new "Pics" objet for an > already persisted Spot. > > Example : > > I persist a Spot object (with a Pics setted) > I retrieve this last Spot from the datastore, then change pics field > with a new Pics Object, and call persist again from the EntityManager. > (in order to update the datastore) > When I retrieve the Spot object, again from the datastore, the pics > field is still setter with the first Pics object, and not the new one. > So I'm a little bit confuse because the new relation isn't persisted ! > > Thanks to App Engine Test helper, I created a small test which show > this use case :https://gist.github.com/734144 > > Where am I wrong ? My code is correct or I call the wrong method on > the entityManager ? or maybe my mapping is wrong ? (or I simply miss > something about JPA) > > Thank you for your help :) -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
