About cascade

forum_thread

OEM enhancing

Hello, I have question regarding OEM licence enhancement. @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)  private SomeClass[] props; @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)     private Map<String, SomeClass2> vars = new TreeMap<String, SomeClass2>(); Are these classes(SomeClass, SomeClass2), when not enhanced, limited by number 1 million instances in DB? Thanks Marta   ... ( fetch = FetchType . EAGER , cascade = CascadeType . ALL ) private SomeClass ... ( fetch = FetchType . EAGER , cascade = CascadeType . ALL ) private ...

 
forum_thread

Entity not removed 100%

When I remove an object from a class it get's removed but the other objects that had that object as an attribute still keep it although I am using @OneToMany(cascade=CascadeType.ALL) This is what it remains when I check the removed object from another object's attributes     ... an attribute still keep it although I am using @OneToMany(cascade=CascadeType.ALL) This is what it remains when I check the ...

 
forum_thread

Foreign key constraint issue

Hi, I'm trying to create two tables (Parent and Child) with a foreign key constraint from Child to Parent so that when the parent is deleted all children are removed as well. Unfortunately, in one specific case that foreign key constraint doesn't apply and I can't figure out what I'm missing. The definitions of the classes are as follows: ...     @ManyToOne(optional = false, cascade = {})     @JoinColumn(name="PARENT_ID", nullable = ... private long id;     @OneToMany(cascade = {CascadeType.MERGE, CascadeType.REMOVE}, mappedBy = "parent", ...

 
forum_thread

How to delete M2M relationship?

In user model class I have the following: public class User implements Serializable { ... ( mappedBy = "attendees" , cascade = CascadeType . ALL ) @ Cascade ( org. hibernate . annotations . CascadeType . ALL ...

 
forum_thread

@Column( name = "columnName") doesn't work

I have created following entity class with custom fields @Entity public class AfwDataKey {    @Id    @GeneratedValue    @Column(name = "KEY_ID")    private long id;    private Long timestamp;    @ManyToOne    @Column(name = "KEY_DESCRIPTOR")    private AfwKeyDescriptor keyDescriptor; ... ( fetch = FetchType . LAZY , cascade = CascadeType . ALL ) @ Column ... ( fetch = FetchType . LAZY , cascade = CascadeType . ALL ) private ...

 
api-jpa

OneToOne.orphanRemoval

(Optional) Whether to apply the remove operation to entities that have been removed from the relationship and to cascade the remove operation to those entities.(Annotation Element of javax.persistence.OneToOne)

 
api-jpa

OneToMany.orphanRemoval

(Optional) Whether to apply the remove operation to entities that have been removed from the relationship and to cascade the remove operation to those entities.(Annotation Element of javax.persistence.OneToMany)

 
forum_thread

ObjectDB Explorer don't show ManyToOne relations

Hello support. we have a problem with the ObjectDB Explorer and @ManyToOne relations. We persist the entity FolderImpl that has an attribute of type ModelElement. If we use an interface for the attribute then the ObjectDB Explorer shows NULL for the attribute although our unit test checks that the attribute is not NULL in the database. @Entity public class ModelElementImpl implements ModelElement { ... } @Entity public class FolderImpl { ... targetEntity = ModelElementImpl. class , cascade = { CascadeType . REFRESH } ) ... targetEntity = ModelElementImpl. class , cascade = { CascadeType . REFRESH } ) ...

 
forum_thread

Global way to set Lazy-loading fetch functionality for all the fields

Hi, for cascading persist, I have 3 choices: - Either locally (@OneToOne(cascade=CascadeType.PERSIST)) - Either at objectdb level (<cascade-persist always="auto" on-persist="false" on-commit="true" />) - Either at JPA global level (orm.xml).   For defining fetch policy, I know the local way to do it (@ManyToOne(fetch=FetchType.LAZY)). Is there any way to do it at objectdb level or JPA global level?   ... I have 3 choices: - Either locally (@OneToOne(cascade=CascadeType.PERSIST)) - Either at objectdb level (<cascade-persist always="auto" on-persist="false" on-commit="true" />) ...

 
forum_thread

Object explorer cannot open odb file. ObjectDB many-to-many relationship

I created a data model to test many-to-many relationship with a link table as following (full code in attachement) ... @ Id @ ManyToOne ( cascade = CascadeType . ALL , optional = false ... @ Id @ ManyToOne ( cascade = CascadeType . ALL , optional = false ...