openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <>
Subject Re: SingleFieldManager crash
Date Wed, 16 Sep 2009 19:08:21 GMT
On Wed, Sep 16, 2009 at 2:48 PM, C N Davies <> wrote:

> The main object is new, but the attached entities are not new, the members
> are populated by retrieving existing entities use em.find.
> That is similar to my case, though usually the existing entities are from a
query. I'm wondering why there is no primary key after the hash for
Supplier, I always get it.

> If I set cascade type to PERSIST I get a different error but basically
> complaining about the same thing:
> What about CascadeType.ALL?

> (JPA orm.xml). You cannot attach a reference to a new object without
> cascading.

I don't understand this statement at all and contend it's not true. I
totally do that all the time. That's why I'm so perplexed. I can even do

A a = new A();
B b = new B();

and it works (provided B with ID of 12 exists in the database).

Daryl Stultz
6 Degrees Software and Consulting, Inc.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message