ObjectDB Database Search

1-50 of 118 results

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 java.util.Map , the cascade element applies to the map

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

JPA Entity Fields

: @OneToOne , @ManyToOne : For references to entity types. @ OneToMany , @ManyToMany : For collections and maps ... . ALL ) MyEntity field2; @ OneToMany ( fetch = FetchType . EAGER ) List field3; } The preceding entity class ... { 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

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

Unable to update a OneToMany Set

Unable to update a OneToMany Set

Deleting JPA Entities

that you can specify by using the orphanRemoval element of the @OneToOne and @ OneToMany annotations ... . For example: @Entity class Employee { : @ OneToMany ( orphanRemoval =true) private List addresses; : } In

Retrieving JPA Entities

= FetchType . EAGER ) private Collection projects; : } Specifying FetchType . EAGER in either the @ OneToMany

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 ... ; ... } Example 3: @Entity public class Company { @Id int id; ... @ OneToMany (targetEntity = com ... ; ... @ 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 java.util.Map , in conjunction with the ElementCollection , OneToMany , or ManyToMany ... class Employee { @ManyToMany public Projects getProjects() { ... } @ OneToMany @MapKeyEnumerated(STRING) public Map getEmployees() { ... } ... } See Also: ElementCollection OneToMany 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)  

jakarta.persistence.MapKey

{ ... @ OneToMany (mappedBy = "department") @MapKey // map key is primary key public Map getEmployees ... { ... @ OneToMany (mappedBy = "department") @MapKey(name = "name") public Map getEmployees

jakarta.persistence.MapKeyTemporal

.Map in conjunction with the ElementCollection , OneToMany , or ManyToMany annotation. Example: @ OneToMany @MapKeyTemporal(DATE) protected Map employees; Deprecated: Newly-written code should use

jakarta.persistence.Convert

@ OneToMany @Convert(converter = ResponsibilityCodeConverter.class, attributeName = "key") Map ... : Apply a converter to an embeddable that is a map key for a relationship @ OneToMany @Convert

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.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

OneToOne.cascade OneToMany .cascade ManyToMany.cascade Since: Jakarta Persistence (JPA) 1.0 Enum

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

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

Does ObjectDB support lazy loading?

a Parent class which contains List , marked with @ OneToMany . After persisting a Parent object, (in ... to @ OneToMany (fetch=FetchType.EAGER), the properties can be read. It seems to me that ObjectDB doesn't ... A { @Id @GeneratedValue Long id; @ OneToMany (fetch=FetchType.LAZY, cascade=CascadeType.ALL) List list

can't get HashMap out of the database

annotating the map with @ OneToMany (fetch=FetchType.EAGER). Outside the DAO method only fields ... signingDate;     @ OneToMany (fetch=FetchType.EAGER, cascade=CascadeType ... class GuestHolder { // Persistent Fields: @Id @GeneratedValue Long id; @ OneToMany (fetch=FetchType

Multiple Collection Fields not update correctly

  v2.8.8_2 I have an entity that has 2 collection fields: @ OneToMany (fetch = FetchType.EAGER)      Collection position;      @ OneToMany (fetch = FetchType.EAGER)      Collection rotation ;   Now if I persist them so the values are: position

problem with lazy loading - unittest project attached

hi, i'm still testing objectdb together with spring-data-jpa. i made a test which should simulate 4 requests 1. save entity 2. read an existing entity, add onetomany relation 3. read an existing entity, add another onetomany relation 4. read entity, get relations. i have the feeling this is not

"Failed to serialize instance" of Set problem

Hi, I'm trying to persists objects defined as follows: @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public abstract class AbstractContainer { ... @ OneToMany (fetch = FetchType.LAZY ... ObjectDB tries to serialize the collection using ordinary Java serialization ignoring the @ OneToMany

List of Enum Values in an entity

LAZY to EAGER :     private @ OneToMany (fetch=FetchType.EAGER) List flags; According ... that the @ OneToMany works here? Thank you Flashbaer Flashbaer Joachim Beig Eclipse is right. It shouldn't

NoSuchFieldError: __odbTracker on NetBeans 7.3 + JBoss 7.1.1

serialVersionUID = 1L; @ManyToOne @Index private City city; @ OneToMany (mappedBy = "owner") private List ... serialVersionUID = 33L; @ OneToMany (mappedBy = "city") private List persons; @ManyToOne @Index private Person

Is it possible to remove parent/child entities without refresh?

.persistence. OneToMany ; import javax.persistence.Persistence; import org.junit.AfterClass; import org ... ;   @ OneToMany (fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "parent

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

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

, but the same problem happens to  uni-directional @ OneToMany fields, and also there seem to be some ... ArrayList (); @ OneToMany (mappedBy = "owner", cascade = CascadeType.ALL) public List getOwnedElements ... my larger real-world application, lots of other @ OneToMany and @OneToOne fields are also null). In

NullPointer when accessing persistent field

as follows; @ OneToMany (cascade=CascadeType.ALL, mappedBy="z_component") @MapKey(name="z_schemeName ... static class A {         @ OneToMany (targetEntity = B.class, mappedBy ... .RemoteTestRunner.main(RemoteTestRunner.java:197)   As before a Map structure was being accessed. @ OneToMany

spuriously objectdb objects have null references

definitions are (for the null references above): ... @ OneToMany (fetch=FetchType.LAZY) @Index public List actions = new ArrayList (); ... @ OneToMany (fetch=FetchType.LAZY) @Index public List childNodes

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

; } @Override public void setId(Long id) { this.id = id; } @ OneToMany (cascade={CascadeType.MERGE ... ; @ OneToMany (cascade={CascadeType.MERGE, CascadeType.PERSIST},