ObjectDB ObjectDB

Internal Website Search

1-10 of 166 resultsRefresh
174

Mapped (Inverse) LAZY @OneToMany vs. Unmapped LAZY @OneToMany

to console a lazy @OneToMany mapped field after a finding entity manager closes. There is a switch DO_VIEW ... manager closes and as expected both a mapped @OneToMany list and an unmapped @OneToMany list are viewable ... = CascadeType.ALL)         A a; //maps: listA_mapped         @OneToMany(fetch = FetchType.LAZY, mappedBy
124

OneToMany and cascade delete problem

with with two different classes with OneToMany relation to one, shared class. For example (first class): @Entity public static class Store { @OneToMany(targetEntity = Offer.class, mappedBy = "store ... { @OneToMany(targetEntity = Offer.class, mappedBy = "product", fetch = FetchType.LAZY, cascade = CascadeType
76

javax.persistence.OneToMany

javax.persistence Annotation OneToMany Target: Fields (including property get methods) Defines ... of the relationship. The OneToMany annotation may be used within an embeddable class contained within an entity ... // In Customer class: @OneToMany(cascade=ALL, mappedBy="customer") public Set
71

OneToMany.mappedBy

Annotation Element javax.persistence.OneToMany String mappedBy The field that owns the relationship. Required unless the relationship is unidirectional. Default value: "" Since: JPA 1.0
71

OneToMany.fetch

Annotation Element javax.persistence.OneToMany FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the associated entities must be eagerly fetched. The LAZY strategy
71

OneToMany.targetEntity

Annotation Element javax.persistence.OneToMany Class targetEntity (Optional) The entity class that is the target of the association. Optional only if the collection property is defined using Java generics. Must be specified otherwise. Defaults to the parameterized type of the collection
71

OneToMany.orphanRemoval

Annotation Element javax.persistence.OneToMany boolean 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. Default value: false Since: JPA 2.0
71

OneToMany.cascade

Annotation Element javax.persistence.OneToMany CascadeType[] cascade (Optional) The operations that must be cascaded to the target of the association. Defaults to no operations being cascaded. When the target collection is a java.util.Map, the cascade element applies to the map value. Default value: {} Since: JPA 1.0
28

JPA Entity Fields

: OneToOne, ManyToOne - for references of entity types. OneToMany, ManyToMany - for collections and maps ... .ALL) MyEntity field2; @OneToMany(fetch=FetchType.EAGER) List<MyEntity> field3; } The entity ... ; } @Entity public class Department { @OneToMany(mappedBy="department") Set<Employee> employees
25

Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabled

Hello! When the JPA entities are not enhanced the removal of an entry from a @OneToMany collection ... .FetchType; import javax.persistence.OneToMany; import javax.persistence.Persistence; import org ... ;   } } @Entity public static class ParentEntity {   @OneToMany(fetch = FetchType.LAZY, cascade

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