ObjectDB Database Search

1-50 of 55 results

jakarta.persistence.ManyToOne

Jakarta Persistence (JPA) Annotation Type jakarta.persistence. ManyToOne Implemented Interfaces ... the relationship field or property of the entity that is the owner of the relationship. A ManyToOne ... using the JoinTable annotation. The ManyToOne annotation may be used within an embeddable class

LAZY @ManyToOne field functions as EAGER

to console a lazy @ ManyToOne field after the entity manager closes. There is a switch DO_VIEW ... closes and as expected both a LAZY @ ManyToOne field and an EAGER @ ManyToOne field are viewable: b ... , when it is marked as @ ManyToOne (fetch=FetchType.LAZY) ?   package com.greensoft.objectdb.test

Conflicting modifiers .... (javax.persistence.Id, javax.persistence.ManyToOne)

, javax.persistence. ManyToOne ) (error 322) at com.objectdb.jpa.EMImpl.persist(EMImpl.java:376) at uk ... .container (javax.persistence.Id, javax.persistence. ManyToOne ) at com.objectdb.o.MSG.d(MSG.java:61 ... .persistence.Id; import javax.persistence.IdClass; import javax.persistence. ManyToOne ; import javax

Broken @ManyToOne reference

public abstract class A { @Id @ ManyToOne (fetch = FetchType.EAGER, cascade=CascadeType.ALL, optional ... ; import javax.persistence. ManyToOne ; import javax.persistence.MappedSuperclass; @MappedSuperclass public abstract class ChildsSuper {   //  @Id   @ ManyToOne (fetch = FetchType.EAGER

ObjectDB Explorer don't show ManyToOne relations

Hello support. we have a problem with the ObjectDB Explorer and @ ManyToOne relations. We persist ... ;@ ManyToOne (targetEntity = ModelElementImpl.class, cascade = {CascadeType.REFRESH}) private ModelElement ... ;@ ManyToOne (targetEntity = ModelElementImpl.class, cascade = {CascadeType.REFRESH}) private

Level 2 cache not hit in @ManyToOne

Hi! I have 2 entities: User and Item, both @Cacheable. Item has @ ManyToOne private User user. Level 2 JPA cache is activated and it works ok for find by id (tested by changing data in explorer and reading in my app). Problem 1: find by id on Item it's good, it hits the cache, but not for its field

JPA Entity Fields

: @OneToOne , @ ManyToOne : For references to entity types. @OneToMany , @ManyToMany : For collections and maps ... { String name; @ ManyToOne Department department; } @Entity public class Department { @OneToMany

Retrieving JPA Entities

{ : @ ManyToOne ( fetch = FetchType . LAZY ) private Employee manager; : } The default for non-collection ... through the field. Specifying FetchType . LAZY in either the @OneToOne or @ ManyToOne annotation excludes

jakarta.persistence.JoinColumn

and the default values apply. Example: @ ManyToOne @JoinColumn(name = "ADDR_ID") public Address getAddress ... public Set getOrders() { return orders; } See Also: ManyToOne OneToMany OneToOne JoinTable ... . If the join is for a OneToOne or ManyToOne mapping using a foreign key mapping strategy, the foreign key

General Performance Issues Illustrated with a Specific Method

; import javax.persistence. ManyToOne ; import javax.persistence.OneToOne; import javax.persistence.Table ... ; private String comments; /* Create Properties */ @ ManyToOne (fetch = FetchType.LAZY) private WebUser ... .persistence.TemporalType.DATE) private Date createdOn; @ ManyToOne (fetch = FetchType.LAZY) private

jakarta.persistence.MapsId

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.MapsId Implemented Interfaces: Annotation Target: Method, Field Designates a ManyToOne or OneToOne relationship attribute that provides ... ; ... @MapsId("empid") // maps the empid attribute of embedded id @ ManyToOne Employee emp; } If a ManyToOne

jakarta.persistence.MapKey

public class Employee { ... @Id Integer getEmpId() { ... } @ ManyToOne @JoinColumn(name = "dept_id ... () {... } ... } @Entity public class Employee { @Id public Integer getEmpId() { ... } ... @ ManyToOne @JoinColumn(name

jakarta.persistence.JoinColumn.name

. If the join is for a OneToOne or ManyToOne mapping using a foreign key mapping strategy, the foreign key ... . If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne / OneToMany

jakarta.persistence.JoinTable

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

jakarta.persistence.JoinColumns

specify both name and referencedColumnName . Example: @ ManyToOne @JoinColumns({ @JoinColumn(name

jakarta.persistence.MappedSuperclass

protected Integer empId; @Version protected Integer version; @ ManyToOne @JoinColumn(name = "ADDR

jakarta.persistence.Embeddable

localNumber; @ ManyToOne protected PhoneServiceProvider provider; ... } @Entity public class

jakarta.persistence.EmbeddedId

= "dep_name")) @EmbeddedId DependentId id; ... @MapsId("empPK") @ ManyToOne Employee emp

jakarta.persistence.FetchType

ManyToMany OneToMany ManyToOne OneToOne Since: Jakarta Persistence (JPA) 1.0 Enum Constants EAGER Data

EntityManager.refresh takes a long time

= CascadeType.REFRESH) @NotNull private List answers = new ArrayList (); @ ManyToOne private City city ... .REFRESH) @NotNull private List interests = new ArrayList (); @ ManyToOne (cascade = CascadeType ... = CascadeType.ALL) @NotNull private List paymentOperations = new ArrayList (); @ ManyToOne private PersonLevel

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

, but I can go through this. I have a clase named Pedido, that have a reference ManyToOne to a clase ... Direccion origen; @ ManyToOne (optional=true) private Cliente cliente; //Opcional @Basic(optional=false ... connection on the oneToMany - manyToOne . But I can't figure it out. Someone can help me? elnll002

Optimistic locking: prevent version increment on entity collection attribute

will be done from the DB but no success. I have tried to add ManyToOne of the owning side (Readings ... to add ManyToOne of the owning side (Readings), This should not make any difference. added EAGER fetch

Missing (null) elements in eager loaded references

children ; @ ManyToOne private Element parent ; etc... } and: @Entity public class DataElement ... children ; @ ManyToOne private DataElement parent ; @Basic private String label ; etc... } Embedable

OneToMany and cascade delete problem

; } and a shared class Offer: @Entity public static class Offer { @ ManyToOne private Product product; @ ManyToOne private Store store; } Naming of this class is not perfect, but in my application Offer

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.Id; import javax.persistence. ManyToOne ; import javax.persistence.MapKey; import javax ... ; @Id   @GeneratedValue   private long id;   @ ManyToOne (fetch = FetchType.LAZY

Merge with Parent/Child entities not possible

.GeneratedValue; import javax.persistence.Id; import javax.persistence. ManyToOne ; import javax ... long id;   @ ManyToOne (fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE

Composite indexes

? #4. Are @Index field used also on relations? @OneToOne, @ ManyToOne ? I don't want to start ... with and without such an index. 4. Are @Index field used also on relations? @OneToOne, @ ManyToOne

Object explorer cannot open odb file. ObjectDB many-to-many relationship

{     @Id @ ManyToOne (cascade = CascadeType.ALL, optional = false)     private User user;         @Id @ ManyToOne (cascade = CascadeType

Adding multi part path index on non-embedable object member

Is there a way to add single member index on members of a object member which is not configured embedable but is/are mapped by id like the two members below.  @Entity public class Customer { @MapsId @ ManyToOne (fetch = FetchType.LAZY) private Merchant merchant; @MapsId @ ManyToOne (fetch

How to avoid NULL values on Embedded entities

;       @Embedded private Direccion origen;     @ ManyToOne

_PersistenceException: Type is not found on getSingleResult.

;      private String segundoApellido;     @ ManyToOne   

Problem persisting a TreeSet field

Hello, I am getting a "java.lang.IllegalArgumentException: Can not set java.util.TreeSet field Message.children to java.util.HashSet" when persisting a Message object with a parent/children relationship: @ ManyToOne private Message parent; @OneToMany(mappedBy = "parent") private TreeSet children

find() cost unreasonable time!

) private int id; @ ManyToOne @JoinColumn(name="parent") protected Nodes parent; @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

Problem with distinct select, order by and equivalent alias/attribute path

; @ ManyToOne     private Location location;     public Street() {  

Are indexes implicitly created for relationships?

Do the following annotations @OneToMany @ ManyToOne @ManyToMany @OneToOne imply @Index   ? Thanks, Carl   FastModel Ben Schreiber Actually these annotations (except @ManyToMany ) should apply @Unique on the @One side. But ObjectDB doesn't apply these indexes automatically

OrphanRemoval not working?

{ ... @ ManyToOne private Invoice invoice; ... } I'm expecting, that removing invoiceitem from the list removes

Beginners questions

; @ ManyToOne @Column(name = "VERLAG_ID") @JoinColumn(name="VERLAG_ID", insertable=false, updatable=false

Global way to set Lazy-loading fetch functionality for all the fields

Hi, for cascading persist, I have 3 choices: - Either locally (@OneToOne(cascade=CascadeType.PERSIST)) - Either at objectdb level ( ) - Either at JPA global level (orm.xml).   For defining fetch policy, I know the local way to do it (@ ManyToOne (fetch=FetchType.LAZY)). Is there any way

@Column( name = "columnName") doesn't work

I have created following entity class with custom fields @Entity public class AfwDataKey { @Id @GeneratedValue @Column(name = "KEY_ID") private long id; private Long timestamp; @ ManyToOne @Column(name = "KEY_DESCRIPTOR") private AfwKeyDescriptor keyDescriptor; @OneToMany(fetch = FetchType.LAZY

Query only works correctly when debug printing results

@GeneratedValue private long id; @ ManyToOne private RequirementLevelEntity wrappingReqLevelEntity

Maintaining referential integrity

annotations like "OneToMany" and " ManyToOne ", but the result is the same. What am I supposed

LEFT (OUTER) JOIN problem when mappedBy is defined

public String toString() { return name; } } @Entity public class InvoiceItem{ @ ManyToOne private Invoice

An ArrayIndexOutOfBoundsException with nested entities and enhanced entities

{ @ ManyToOne (targetEntity = DataTypeImpl.class, cascade = {CascadeType.ALL }, fetch = FetchType.LAZY

Some details about db behavior

Suppose I have two entities... A B - A B has a ManyToOne relationship with A. When my database is empty and I persist a valid B entity (that contains actual A reference) I observe some behavior that I'm not sure I understand. 1. In ObjectDB explorer I see Both B and A Entity classes available in

Adding EntityListener Throws Unexpected Internal Exception

;   @MapsId     @ ManyToOne (fetch = FetchType.LAZY)    

Inverse OneToMany Mapping and EmbeddedId

.persistence . Id ; import javax.persistence . ManyToOne ; import javax.persistence . OneToMany ... ; public int id ;          @ ManyToOne ( )          public A a ;          @ ManyToOne ( )      

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

; } @ ManyToOne @JoinColumn(name="account_id", nullable=false) public Account account; public Account ... id = 1L;         @ ManyToOne       

com.objectdb.o._PersistenceException: Failed to locate set method for field property using reflection

(); ... public PlatformTicker() { } ... @ ManyToOne public Platform getPlatformConnector() { return