openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Ezzio <dez...@bea.com>
Subject Re: Update & OneToMany
Date Fri, 10 Aug 2007 15:06:52 GMT
Hi Esteve,

Doesn't sound normal.  Can you give us more info?  Some questions that 
may help you understand what is going on.

What are all the annotations for the OneToMany relationship?

If Entity1 has a simple value attribute and you update that, does the 
same behavior occur for the association?

Is it possible that you have assigned a new collection to your field, 
instead of modifying the existing collection?  If so, does the behavior 
change if you change your application to modify the existing collection?

HTH,

David Ezzio

Esteve Boix wrote:
> Hi all,
> 
> I'm observing the following behaviour, and I'd like to know if it's
> normal or if it's a config problem:
> 
> I have an Entity1 with a @OneToMany relation to Entity2, using a table
> to link both entities. Everytime I update Entity1, OpenJPA deletes all
> the links from the link table and recreates all the entities Entity2.
> This is weird cause I end up with a lot of orphaned Entity2 objects
> (OpenJPA clears the links, but not the original entities).
> 
> Regards,
> Esteve
> 


Notice:  This email message, together with any attachments, may contain information  of  BEA
Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,
 copyrighted  and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete it.

Mime
View raw message