Enhancement 302 : ENHANCEMENT - Add ability to specify cascadeRemove=false on PrivateOwned
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.7.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
26/05/2010
Updated 
26/05/2010
Type 
Enhancement
 
Attachments 
No attachments

The issue is that PrivateOwned implicitly adds a Cascade REMOVE to the association/relationship.

So if you do NOT want the cascade REMOVE on the relationship but you do want PrivateOwned to automatically delete any beans that are removed from the collection then you can use:

@PrivateOwned(cascadeRemove=false)

@OneToMany(cascade=CascadeType.PERSIST,mappedBy="master")
        @PrivateOwned(cascadeRemove=false)
        List<TSDetailTwo> details;

See TestPrivateOwnedNoCascadeRemove for a test case example.

 
Rob 26 May 09:12
Fixed in HEAD

fixed in HEAD.

woResponse

Upload a file