> I am not sure what you mean. I never detach anything explicitly, so I > have no idea how to detach anything else.
Yes you do ... in JPA at commit or at close of the EntityManager the contract is to detach all current entities, as per the JPA spec. As you identified later in your post. > >javax.jdo.JDODetachedFieldAccessException: You have just attempted to > access field "retweets" yet this field was not detached when you > detached the object. Either dont access this field, or detach it when > detaching the object. > > I find that very strange. > 1. I am using JPA, how do I get a JDO exception? Because the JPA spec doesn't define the behaviour of accessing an undetached field of a detached object so we can throw whatever we want. We could throw something DataNucleus specific but then what's the point ? In some implementations they do nothing and return null, so the user has no real expectation here. Symptoms of a poor spec ... JPA2 will provide a detach method, when the spec is final ... --Andy (DataNucleus) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
