openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <da...@6degrees.com>
Subject Re: ManyToMany delete
Date Wed, 14 Oct 2009 17:26:36 GMT
On Wed, Oct 14, 2009 at 1:03 PM, Luis Fernando Planella Gonzalez <
lfpg.dev@gmail.com> wrote:

> Either ALL or DELETE will delete the related entities when deleting the
> owner.
> You can specify the other cascade types, such as:
> cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}
>
> I've set it to the CascadeType.MERGE as a test. Removing the A instance now
removes the special_a_to_b_table records before deleting the A record
without deleting the B's. I was under the impression
that special_a_to_b_table records would not be deleted without
CascadeType.DELETE included. Lesson learned. Thanks.

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:daryl@6degrees.com

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