About cascade

11-20 of 200Refresh
Forum
20

Cascading persistence through an inverse field

Hi! I was playing with cascading persistence with @ManyToMany and inverse @ManyToMany fields, and I noticed that I can only get cascading persistence in one direction. If the "owner ... -related code to keep it simple. @Entity public class PointCollection { @ManyToMany(cascade
Issue
20

New entity objects are duplicated on merge cascading

When merge is cascaded to a new entity object that has not been persisted ... = GenerationType.AUTO)         private Long id;                 @OneToMany(cascade= CascadeType ... object by a reference with cascading persist disabled. The following test case demonstrates
Issue
20

I can't get cascading delete to work in JDO

I enclose a Netbeans project which demonstrates the problem.  Cascading persist works, but cascading delete does not, leaving orphan objects. Thank you for this report. Apparently cascading delete ... documentation page). Build 2.7.5_04 implements cascading delete in JDO. Your NetBeans project was converted
Forum
20

Cascading merge() leading to "Attempt to persist a reference to a non managed instance" error

with a parent/child relationship and cascading merge() operations. The parent has an application defined id ... (cascade = CascadeType.ALL)     @SuppressWarnings("unused")     private Parent owner;     public ... or 159 Thanks for your assistance.   Thank you for reporting this problem. Cascading merge to new
Issue
20

Sometimes cascade persist does not work during commit

and the commit persists the entities B automatically by cascading. But sometimes the cascading doesn't ... ?   // persist configuration: <cascade-persist always="auto" on-persist="true" on-commit="true ... A { @Id int id; @Basic String strValue; @OneToMany (cascade
Issue
19

Issue with cascade delete & add/remove

of Address which cascades deletes (orphanRemoval=true) to its children which is what we want ... Entities within the collection of a Contact when we delete the Contact? Is that cascaded or do we need ... {         private String name = null;         @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true
Forum
19

Memory leak while merging parent with No Cascade annotation with children

comparing Cascade.ALL (or Cascade.MERGE ) to nothing. Tested with last version of Object Db ( 2.5.5 ... MyEntity {         @Id         private String name;         @ManyToMany(cascade
Forum
19

OneToMany and cascade delete problem

{ @OneToMany(targetEntity = Offer.class, mappedBy = "product", fetch = FetchType.LAZY, cascade = CascadeType ... . The problem is, that after removing product, all "connected" offers are also removed (cascade ... .java:73) I think that the Offer class and cascading delete from Product to Offer are irrelevant
Forum
19

Cascade delete with unidirectional mapping

    Suppose entity A is referenced from entity B, like (A -> * B) but not actually having that reference, instead only B has @ManyToOne relationship to A and A has none. Is there a way to cascade ... ? Operations are cascaded using relationships, so if you have no relationship in that direction
Forum
19

Cascading delete

Is there a configuration parameter to set this? You can set cascade delete using annotations (see also the Orphan Removal section). JDO defines similar annotations, and both JPA and JDO support ... . You cannot set global cascade delete since that will be too risky - you may delete the entire database. dmoshal