ObjectDB Database Search
1-50 of 166 resultsjakarta.persistence.OneToMany Jakarta Persistence (JPA) Annotation Type jakarta.persistence. OneToMany Implemented Interfaces ... of the entity that is the owner of the relationship. A OneToMany association usually maps a foreign ... the JoinColumn annotation. Alternatively, a unidirectional OneToMany association is sometimes mapped | |
jakarta.persistence.OneToMany.orphanRemoval Jakarta Persistence (JPA) Method in jakarta.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: false Since: Jakarta Persistence (JPA) 2.0 | |
jakarta.persistence.OneToMany.targetEntity Jakarta Persistence (JPA) Method in jakarta.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 | |
jakarta.persistence.OneToMany.cascade Jakarta Persistence (JPA) Method in jakarta.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 Map , the cascade element applies to the map value. Default: {} Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.OneToMany.fetch Jakarta Persistence (JPA) Method in jakarta.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 | |
jakarta.persistence.OneToMany.mappedBy Jakarta Persistence (JPA) Method in jakarta.persistence. OneToMany String mappedBy The field that owns the relationship. Required unless the relationship is unidirectional. Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
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)   | |
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)   | |
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 SetUnable 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 | |
jakarta.persistence.JoinColumn Customer class @ OneToMany @JoinColumn(name = "CUST_ID") // join column is in the table for Order public Set getOrders() { return orders; } See Also: ManyToOne OneToMany OneToOne JoinTable ... OneToMany mapping using a foreign key mapping strategy, the foreign key is in the table of the target | |
jakarta.persistence.MapKeyJoinColumn and the default values apply. Example 1: @Entity public class Company { @Id int id; ... @ OneToMany ... 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 relationship using a foreign key mapping strategy | |
jakarta.persistence.MapKeyColumn. 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 relationship ... is for a OneToMany or ManyToMany entity relationship using a join table, the name of the join table | |
jakarta.persistence.MapKeyClass one of the collection-valued relationship annotations ( OneToMany or ManyToMany ). The MapKey annotation ... ; ... } Example 3: @Entity public class Company { @Id int id; ... @ OneToMany (targetEntity = com.example ... ; ... @ OneToMany Map organization; } See Also: ElementCollection OneToMany ManyToMany Since: Jakarta | |
jakarta.persistence.ManyToOne is bidirectional, the non-owning OneToMany entity side must use the mappedBy element to specify ... , the non-owning OneToMany entity side must use the mappedBy element of the OneToMany annotation ... pm; // Bidirectional } @Entity public class ProgramManager { @Id int id; @ OneToMany (mappedBy | |
jakarta.persistence.MapKeyEnumerated relationship of type Map , in conjunction with the ElementCollection , OneToMany , or ManyToMany annotation ... Employee { @ManyToMany public Projects getProjects() { ... } @ OneToMany @MapKeyEnumerated(STRING) public Map getEmployees() { ... } ... } See Also: ElementCollection OneToMany ManyToMany Since: Jakarta | |
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)   | |
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 ... of the collection table for the map value. If the map is for a OneToMany or ManyToMany entity | |
jakarta.persistence.MapKey when MapKey is specified and vice versa. Example 1: @Entity public class Department { ... @ OneToMany ... { ... @ OneToMany (mappedBy = "department") @MapKey(name = "name") public Map getEmployees | |
jakarta.persistence.MapKeyTemporal with the ElementCollection , OneToMany , or ManyToMany annotation. Example: @ OneToMany @MapKeyTemporal(DATE | |
jakarta.persistence.Convert) Map responsibilities; Example 6: Apply a converter to a map key of basic type @ OneToMany @Convert ... to an embeddable that is a map key for a relationship @ OneToMany @Convert(attributeName = "key | |
jakarta.persistence.OrderColumn annotation is specified on a OneToMany or ManyToMany relationship or on an element collection ... ccNumber; @ OneToMany // unidirectional @OrderColumn List transactionHistory; ... } See Also: OrderBy | |
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;   | |
jakarta.persistence.JoinColumn.name OneToMany mapping using a foreign key mapping strategy, the foreign key is in the table of the target entity. If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne / OneToMany | |
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 relationship | |
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 table | |
jakarta.persistence.MapKeyJoinColumn.name 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, the foreign | |
jakarta.persistence.JoinColumn.table. 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 | |
jakarta.persistence.JoinTable ManyToOne , OneToOne , ManyToMany , or OneToMany . See Also: JoinColumn JoinColumns Since: Jakarta | |
jakarta.persistence.FetchType ManyToMany OneToMany ManyToOne OneToOne Since: Jakarta Persistence (JPA) 1.0 Enum Constants EAGER Data | |
jakarta.persistence.CascadeType::cascade OneToOne::cascade OneToMany ::cascade ManyToMany::cascade Since: Jakarta Persistence (JPA) 1.0 Enum | |
Error 613 - i cant put a list | |
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 | |
jakarta.persistence.JoinColumn.referencedColumnName of the target entity. When used with a unidirectional OneToMany foreign key mapping, the referenced column | |
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 |