I've seen this error before, in the case where my Id generation
strategy was IDENTITY, and I had a new persisted but unflushed object
on the One-side of a One-Many relation, and I tried to persist a new
object on the Many side, and then called commit. OpenJPA would try to
set the FK value on the Ma
Hello, some of you have read about this issue I am having and some have
offered various suggestions. I'm still getting this
org.apache.openjpa.persistence.InvalidStateException: Encountered
unmanaged object
in persistent field "...model.Case.addedBy" during flush. However, this
field does not al
On Wed, Dec 23, 2009 at 2:03 PM, Craig L Russell wrote:
> Hi,
>
> I surmise that you're using an automatically generated id for "a",
> otherwise accessing the id field would not normally trigger a database
> access.
>
Right.
>
> But I also suspect that the real issue is that the unmanaged entity
Hi,
I surmise that you're using an automatically generated id for "a",
otherwise accessing the id field would not normally trigger a database
access.
But I also suspect that the real issue is that the unmanaged entity is
not being handled properly...
Craig
On Dec 23, 2009, at 8:01 AM,
On Wed, Dec 23, 2009 at 10:42 AM, Daryl Stultz wrote:
> So it seems I should at least not be referencing the id of "a" until after
> the commit.
>
While this may have prevented this particular exception (or maybe it would
have happened upon commit anyway), I can't see that referencing the id of
Hello, I occasionally get this exception (meaning it's not repeatable):
org.apache.openjpa.persistence.InvalidStateException:
Encountered unmanaged object in persistent field
"model.EntityA.b" during flush.
However, this field does not allow cascade persist.
Set the cascade attribute for this fie