Hi Darryl, Well I am not a JPA expert so I'll answer the bit I can.
"How did you end up resolving your problem? I assume the City child is not allowed to be null? I'm not clear how your system got into the state it was in (is it repeatable?)." I have had this issue quite a number of times, it turned out to be a logic issue in the base class for my in my backing bean that would null out the child entity in an main entity, when this condition occurs I will always get this error. Can I reproduce it? ... more times than I care to count :) Chris -----Original Message----- From: Daryl Stultz [mailto:da...@6degrees.com] Sent: Thursday, 20 August 2009 4:48 AM To: users@openjpa.apache.org Subject: Re: Encountered unmanaged object On Wed, Aug 19, 2009 at 4:27 PM, C N Davies <c...@cndavies.com> wrote: > Hi Daryl, > > I get that exact error if one of my fields in my main entity has a > reference > to a child entity and the child is null. The next line of the error message is something like this: > FailedObject: blah.model.A-1234 I think that means the instance of A with id 1234 is the object that's failing, thus it's not null. Or maybe the instance of A has a null property? Just trying to see if my case fits with yours or JIRA OPENJPA-714. Can an Open JPA expert tell me if the problem is with the state of MyEntity, A or some property of A? For example if I have an Address > entity that contains a City entity and for some reason my City entity is > null, then when I try to persist the Address entity, I'll get this error. > It > only seems to happen when I have the child entity cascade set to REFRESH. Hmm, I'm currently using CascadeType "NONE" (empty) for the properties that have failed. How did you end up resolving your problem? I assume the City child is not allowed to be null? I'm not clear how your system got into the state it was in (is it repeatable?). Thanks for the input. -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:da...@6degrees.com