ObjectDB Database Search

1-50 of 164 results

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 ... ; @ OneToMany (fetch = FetchType.LAZY, mappedBy = "a", cascade = CascadeType.ALL)    

AnnotationRef jakarta.persistence.OneToMany

JPA Annotation OneToMany Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies a many ... of the relationship. A OneToMany association usually maps a foreign key column or columns in the table ... , a unidirectional OneToMany association is sometimes mapped to a join table using the JoinTable annotation

JPA Entity Fields

- for references of entity types. OneToMany , ManyToMany - for collections and maps of entity types ... ; @ OneToMany ( fetch = FetchType . EAGER ) List field3; } The entity class declaration ... { String name; @ManyToOne Department department; } @Entity public class Department { @ OneToMany

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") private List offers; } second class: @Entity public static class Product { @ OneToMany (targetEntity

Error: Failed to write value of field X using reflection (oneToMany relation)

Persona{ @ OneToMany (mappedBy="Pedido.cliente") public List pedidos; } The class Persona ... connection on the oneToMany - manyToOne. But I can't figure it out. Someone can help me? elnll002 ... You have to change the value of the mappedBy attribute: @ OneToMany (mappedBy="cliente") i.e. specify the field

JPA vs JDO - which is more efficient for OneToMany queries?

definition is valid in JPA: @Entity class Customer { @ OneToMany // the annotation is not required by ... this. Using JPA: @Entity class Customer { @ OneToMany (mappedBy="customer") Vector orders; }   ... other operations. support Support wow - just tried it, pretty impressive. I used JPA, and the @ OneToMany (mappedBy

@OneToMany(fetch = FetchType.LAZY) list is always null

Hello. @ OneToMany (fetch = FetchType.LAZY) doesn't work when using EJB or something else related to J2EE. parent.getChildren() returns null. Here is a simple example: Bean: @Named("test ... , generator = "b") private int id; @ OneToMany (fetch = FetchType.LAZY, cascade = CascadeType

how to query by properties of onetomany relations? (Error 990)

is: @ OneToMany private Set bars; bars.name is just a String in my test database i have one Foo entity ... class Foo {         @ OneToMany (cascade=CascadeType.PERSIST)  

AnnotationAttrRef jakarta.persistence.OneToMany.orphanRemoval

JPA Annotation Attribute in jakarta.persistence. OneToMany boolean orphanRemoval default false (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. Since: JPA 2.0

AnnotationAttrRef jakarta.persistence.OneToMany.fetch

JPA Annotation Attribute in jakarta.persistence. OneToMany FetchType fetch default FetchType.LAZY (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

AnnotationAttrRef jakarta.persistence.OneToMany.mappedBy

JPA Annotation Attribute in jakarta.persistence. OneToMany String mappedBy default "" The field that owns the relationship. Required unless the relationship is unidirectional. Since: JPA 1.0

AnnotationAttrRef jakarta.persistence.OneToMany.cascade

JPA Annotation Attribute in jakarta.persistence. OneToMany CascadeType [] cascade default {} (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. Since: JPA 1.0

AnnotationAttrRef jakarta.persistence.OneToMany.targetEntity

JPA Annotation Attribute in jakarta.persistence. OneToMany Class targetEntity default void.class (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

Memory use in OneToMany relationships

Hello everyone, I have a question regarding the OneToMany / ManyToOne Relationship in ObjectDB. So imaging following setup: We have class A which holds an collection (List, Arrray ...) of class B. In a more usual DB like MySQL with a seperate server we first query for the Entitys of class

Bidirectional OneToMany is slow on updated items

: @ OneToMany (cascade = {CascadeType.ALL}, fetch = FetchType.LAZY/*, mappedBy = "person"*/) private Set

Removing an element from an @OneToMany doesn't work

Hello. I have a Parent and Child entities. // in the parent @ OneToMany (mappedBy = "parent", fetch = FetchType.EAGER, cascade = CascadeType.ALL) private List children; // in the child @ManyToOne private Parent parent; Somewhere I do this: parent.getChildren().remove(0); manager.merge(parent

OneToMany Bidirectional Relationship Problem

Hi, I'm pretty certain I'm doing something stupid. I've read everything I can find on OneToMany in the forum and in the JPA docs, but I can't get it to work with 2.4.0_04. I've attached a testcase. I want the owning object present in the child, (in the example, Team to be in Player). Thanks Paul

Unable to update a OneToMany Set

Unable to update a OneToMany Set

Deleting JPA Entity Objects

which can be specified using the orphanRemoval element of the @OneToOne and @ OneToMany annotations: @Entity ... for collection and map fields. For example: @Entity class Employee { : @ OneToMany ( orphanRemoval

Retrieving JPA Entity Objects

) private Collection projects; : } Specifying FetchType . EAGER explicitly in @ OneToMany or @ManyToMany

Inverse OneToMany Mapping and EmbeddedId

.persistence . Id ; import javax.persistence . ManyToOne ; import javax.persistence . OneToMany ... ; objectdb-2.9.0_03  *   *         issue: Inverse @ OneToMany (mappedBy ... : Is it possible to map Entitys inverse OneToMany if this are  *        

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 ... javax.persistence. OneToMany ; import javax.persistence.Persistence; import org.junit.Assert; public ... {   @ OneToMany (fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)  

EntityManager.refresh takes a long time

relationsto itself with a cascade refresh: @ OneToMany (mappedBy = "person", cascade = CascadeType.ALL) private List openIdAuths = new ArrayList (); @ OneToMany (mappedBy = "person", cascade = CascadeType ... = CascadeType.REFRESH) @NotNull private List selectedMePersons = new ArrayList (); @ OneToMany (mappedBy

significant performance decrease

; @ OneToMany (fetch=FetchType.LAZY) public List actions = new ArrayList (); @ OneToMany (fetch=FetchType.LAZY) public List childNodes = new ArrayList (); @ OneToMany (fetch=FetchType.LAZY) public List container ... (fetch=FetchType.LAZY) public ObjectNode currentOperation; @ OneToMany (fetch=FetchType.LAZY) public List

persisting object with long[][] arrays of array

.persistence. OneToMany ; @Entity public class TESTObject implements Serializable{     ... ;  @ OneToMany (fetch = FetchType.EAGER, cascade = CascadeType.ALL) public long[] time;     @ OneToMany (fetch = FetchType.EAGER, cascade = CascadeType.ALL) private long[][] a1;   

AnnotationRef jakarta.persistence.MapKeyJoinColumn

. If the join is for a map key for a ManyToMany entity relationship or for a OneToMany entity relationship using a join table, the foreign key column is in a join table. If the join is for a OneToMany entity ... is for a map key for a ManyToMany entity relationship or for a OneToMany entity relationship using a join table

AnnotationRef jakarta.persistence.JoinColumn

: See Also: ManyToOne OneToMany OneToOne JoinTable CollectionTable ForeignKey Since: JPA 1.0 Public ... the table of the source entity or embeddable. If the join is for a unidirectional OneToMany mapping ... . If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne / OneToMany mapping

Error 613 - i cant put a list into a Squad object

. OneToMany ; @Entity public class Squad {     private int squadId;     @ OneToMany ()     private List athlets;     public ... .persistence. OneToMany ; @Entity public class Athlet extends Person implements Serializable {   

Optimistic locking: prevent version increment on entity collection attribute

seem to have some issues. I have changed my classes to have a OneTomany mappedBy relationship as follows ... ;  @Id private long id;        @ OneToMany (mappedBy="document")    ... static long ID_SEQ = 0; @Id private long id = ID_SEQ++; @ OneToMany (mappedBy="document") private

Lazy loading does not work - crud takes long

tomee7.0.0SNAPSHOT,objectdb 2.6.4 The OneToMany Entities are filled with 40.000 Records and they have between 20-40 Columns. It takes over 50s to load all Project Enities that contains the OneToMany ... ; @ OneToMany (cascade = CascadeType.ALL, orphanRemoval = true, mappedBy="project",fetch = FetchType.LAZY)  

Error 363 - Failed to read value of inverse relationship

{ @Id private String id; @ OneToMany (mappedBy="town") private Set events; public Set getEvents() { Set ... List postedMessages = new ArrayList (); @ OneToMany (mappedBy = "address") private List ... (); private String text; @ OneToMany (/*fetch=FetchType.LAZY, cascade=CascadeType.ALL, */mappedBy

AnnotationRef jakarta.persistence.MapKeyColumn

relationship or for a OneToMany entity relationship using a join table, the map key column is in a join table. If the map key is for a OneToMany entity relationship using a foreign key mapping ... of the collection table for the map value. If the map key is for a OneToMany or ManyToMany entity relationship using

AnnotationAttrRef jakarta.persistence.MapKeyJoinColumn.table

is for a map key for a ManyToMany entity relationship or for a OneToMany entity relationship using a join table, the foreign key column is in a join table. If the join is for a OneToMany entity ... , the name of the collection table for the map value. If the map is for a OneToMany or ManyToMany entity

Missing (null) elements in eager loaded references

has a OneToMany relationship to DataElement. Every relationship is eagerly fetched   Problem ... extends BaseCostElement { @ OneToMany (mappedBy = "parent" , fetch = FetchType. EAGER ) private List ... extends BaseCostElement { @ OneToMany (mappedBy = "parent" , fetch = FetchType. EAGER ) private List

EntityManager JPA or JDO impl and different behavior

; @ OneToMany (cascade=CascadeType.PERSIST, fetch=FetchType.EAGER)         ... ;     }         @ OneToMany (cascade=CascadeType ... only at the database id.   Second issue. The docs at: http://www.objectdb.com/api/java/jpa/ OneToMany state

AnnotationRef jakarta.persistence.ManyToOne

of the object being referenced. If the relationship is bidirectional, the non-owning OneToMany entity ... to an entity class. If the relationship is bidirectional, the non-owning OneToMany entity side must use the mappedBy element of the OneToMany annotation to specify the relationship field or property

AnnotationAttrRef jakarta.persistence.MapKeyJoinColumn.name

or for a OneToMany entity relationship using a join table, the foreign key column is in a join table. If the join is for a OneToMany entity relationship using a foreign key mapping strategy

AnnotationAttrRef jakarta.persistence.MapKeyColumn.table

, the name of the collection table for the map value. If the map key is for a OneToMany or ManyToMany ... is for a OneToMany entity relationship using a foreign key mapping strategy, the name of the primary

AnnotationRef jakarta.persistence.MapKeyEnumerated

with the ElementCollection , OneToMany , or ManyToMany annotation. If the enumerated type is not ... {JUNIOR, SENIOR, MANAGER, EXECUTIVE See Also: ElementCollection OneToMany ManyToMany Since: JPA 2.0

AnnotationAttrRef jakarta.persistence.MapKeyColumn.name

. If the map key is for a ManyToMany entity relationship or for a OneToMany entity relationship using a join table, the map key column is in a join table. If the map key is for a OneToMany entity

AnnotationRef jakarta.persistence.MapKeyClass

annotations ( OneToMany or ManyToMany ). The MapKey annotation is not used when MapKeyClass is specified and vice versa. Example 1: {@snippet : See Also: ElementCollection OneToMany ManyToMany Since: JPA

AnnotationAttrRef jakarta.persistence.JoinColumn.table

embeddable. If the join is for a unidirectional OneToMany mapping using a foreign key mapping strategy ... bidirectional ManyToOne / OneToMany mapping using a join table, the name of the join table

AnnotationAttrRef jakarta.persistence.JoinColumn.name

OneToMany mapping using a foreign key mapping strategy, the foreign key is in the table of the target ... / OneToMany mapping using a join table, the foreign key is in a join table. If the join

AnnotationRef jakarta.persistence.JoinTable

ManyToOne , OneToOne , ManyToMany , or OneToMany . See Also: JoinColumn JoinColumns Since: JPA 1.0

EnumRef jakarta.persistence.CascadeType

.cascade OneToOne.cascade OneToMany .cascade ManyToMany.cascade Since: JPA 1.0 Enum Constants

AnnotationRef jakarta.persistence.OrderColumn

reordering affecting the list. The OrderColumn annotation is specified on a OneToMany or ManyToMany

EnumRef jakarta.persistence.FetchType

. Example: {@snippet : See Also: Basic ElementCollection ManyToMany OneToMany ManyToOne OneToOne Since: JPA

AnnotationAttrRef jakarta.persistence.JoinColumn.referencedColumnName

of the target entity. When used with a unidirectional OneToMany foreign key mapping, the referenced column

AnnotationRef jakarta.persistence.MapKeyTemporal

, OneToMany , or ManyToMany annotation. Example: {@snippet : Since: JPA 2.0 Public Annotation

Best practise loading big data

a boolean flag. @Entity class MyStepBlockCollection { @ OneToMany ( cascase = ALL , fetch = Lazy , target = MyStepBlock } ArrayList stepBlocks; } @Entity class MyStepBlock { @ OneToMany ( cascase ... { @ OneToMany ( cascase = ALL , fetch = Lazy , target = MyStepBlock } ArrayList stepBlocks; } @Entity