ObjectDB ObjectDB

Internal Website Search

11-20 of 142 resultsRefresh
137

orphanRemoval = true not working when CascadeType.REMOVE is disabled

try use @OneToMany(cascade = CascadeType.REMOVE) Address entities used Employee (id=1) deleted
34

Deleting JPA Entity Objects

with CascadeType.REMOVE (or CascadeType.ALL, which includes REMOVE) indicates that remove operations ... =CascadeType.REMOVE) private Address address; : } In the example above, the Employee ... class. Due to the CascadeType.REMOVE setting, when an Employee instance is removed the operation
32

EntityManager.refresh takes a long time

refresh: @OneToMany(mappedBy = "person", cascade = CascadeType.ALL) private List<OpenIdAuth> openIdAuths = new ArrayList<>(); @OneToMany(mappedBy = "person", cascade = CascadeType ... = CascadeType.REFRESH) @NotNull private List<Person> selectedPersons = new ArrayList
29

Storing JPA Entity Objects

a reference field with CascadeType.PERSIST (or CascadeType.ALL that also covers PERSIST) indicates ... { : @OneToOne(cascade=CascadeType.PERSIST) private Address address; : } In ... of Address, which is another entity class. Due to the CascadeType.PERSIST setting, when an Employee
28

Persist error @ManyToMany how to define correct entities relationships

private long id; @ManyToMany(cascade=CascadeType.PERSIST) private List<Category> categories ... .Serializable; import java.util.ArrayList; import java.util.List; import javax.persistence.CascadeType ... private long id; @ManyToMany(cascade=CascadeType.PERSIST) private List
26

Retrieving JPA Entity Objects

a reference field with CascadeType.REFRESH (or CascadeType.ALL, which includes REFRESH) indicates ... { : @OneToOne(cascade=CascadeType.REFRESH) private Address address; : } In ... of Address, which is another entity class. Due to the CascadeType.REFRESH setting, when an Employee
21

persisting object with long[][] arrays of array

(); Here is the object: import java.io.Serializable; import javax.persistence.CascadeType; import javax ... = FetchType.EAGER, cascade = CascadeType.ALL) public long[] time;     @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL) private long[][] a1;     @OneToMany(fetch = FetchType.EAGER, cascade
18

Updating JPA Entity Objects

objects by fields that are marked with CascadeType.PERSIST or CascadeType.ALL are also persisted
13

JPA Entity Fields

EntityWithFieldSettings { @Basic(optional=false) Integer field1; @OneToOne(cascade=CascadeType
3

ManyToOne.cascade

Annotation Element javax.persistence.ManyToOne CascadeType[] cascade (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded. Default value: {} Since: JPA 1.0

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support