What do your JDO objects look like? - Jason
On Thu, Sep 10, 2009 at 10:07 AM, Toby <[email protected]> wrote: > > Hello Jason, > > I have a similar problem and I use the way you suggest by invoking the > detachCopyAll method. > It works fine, my objects are detached. > I have problem with objects that contain collections. The collections > are not detached, they stay null. > > I tried several things, like wrapping into a transaction. > pm.setDetachAllOnCommit(true); .. Nothing. > The only thing that solves the issue is touching that collection > before I detache. That is quite ugly code. I am sure it is a little > thing but I can not figure it out. > > Do you have a hint for me? > > Thank you, > > Tobias > > On Sep 5, 1:56 am, "Jason (Google)" <[email protected]> wrote: > > I can see where our documentation is misleading about this topic, and I'm > > working to get this updated. > > > > - Jason > > > > On Fri, Sep 4, 2009 at 4:54 PM, Jason (Google) <[email protected]> > wrote: > > > What code are you using to detach the entities? If you're just calling > > > setDetachAllOnCommit, then yes, this requires a transaction. If you > don't > > > use transactions, then you can do something like this: > > > > > obj = pm.getObjectById(Object.class, key); > > > obj = pm.detachCopy(obj); > > > > > There's a similar detachCopyAll for detaching Collections. I use these > in > > > my own applications and they work fine. > > > > > - Jason > > > > > On Thu, Sep 3, 2009 at 11:28 AM, Esteban Masoero < > [email protected] > > > > wrote: > > > > >> Hi there, > > > > >> I'm having a problem similar to the one described here > > > > >>http://groups.google.com/group/google-appengine-java/browse_thread/th. > .. > > >> , > > >> but using JDO instead of JPA. > > >> Instead of fetching the object in a "normal" way, I fetched it inside > a > > >> transaction and it worked fine (the object was properly detached). > > > > >> Should an issue be reported? or is this problem addressed by the the > > >> issue 1906 > > >> (http://code.google.com/p/googleappengine/issues/detail?id=1906)?(I<http://code.google.com/p/googleappengine/issues/detail?id=1906%29?%28I>ask > > >> it because as I see, the exceptions thrown by that JPA-examble are jdo > > >> exceptions, so it gives me the feeling that JDO and JPA share some > > >> components, and consequently it would be the same bug.) > > > > >> Thanks, > > > > >> Esteban > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
