ObjectDB Database Search

1-50 of 85 results

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

AnnotationRef jakarta.persistence.ManyToOne

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

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

AnnotationAttrRef jakarta.persistence.ManyToOne.optional

JPA Annotation Attribute in jakarta.persistence. ManyToOne boolean optional default true (Optional) Whether the association is optional. If set to false then a non-null relationship must always exist. May be used in schema generation to infer that the mapped foreign key column is not null . Since: JPA 1.0

AnnotationAttrRef jakarta.persistence.ManyToOne.fetch

JPA Annotation Attribute in jakarta.persistence. ManyToOne FetchType fetch default FetchType.EAGER (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 entity

AnnotationAttrRef jakarta.persistence.ManyToOne.cascade

JPA Annotation Attribute in jakarta.persistence. ManyToOne CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded. Since: JPA 1.0

AnnotationAttrRef jakarta.persistence.ManyToOne.targetEntity

JPA Annotation Attribute in jakarta.persistence. ManyToOne Class targetEntity default void.class (Optional) The entity class that is the target of the association. Defaults to the type of the field or property that stores the association. Since: JPA 1.0

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

). Every persistent field can be marked with one of the following annotations: OneToOne , ManyToOne ... { String name; @ ManyToOne Department department; } @Entity public class Department { @OneToMany

Retrieving JPA Entity Objects

retrieval by using a lazy fetch type: @Entity class Employee { : @ ManyToOne ( fetch = FetchType . LAZY ... FetchType . LAZY in either @OneToOne or @ ManyToOne annotations (currently ObjectDB does not distinguish

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

AnnotationRef jakarta.persistence.JoinColumn

: See Also: ManyToOne OneToMany OneToOne JoinTable CollectionTable ForeignKey Since: JPA 1.0 Public ... is for a OneToOne or ManyToOne mapping using a foreign key mapping strategy, the foreign key column is in ... . If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne / OneToMany mapping

Should derived fields of an EmbeddedId be manually maintained by app code?

javax.persistence. ManyToOne ; import javax.persistence.MapsId; import javax.persistence.Version ... ; @ ManyToOne (fetch=FetchType.LAZY) @MapsId("cont") private EContainer container; public EContainer ... ; import javax.persistence.FetchType; import javax.persistence. ManyToOne ; import javax.persistence

Error 363 - Failed to read value of inverse relationship

.AUTO) private long id; @ ManyToOne (optional=false) private ETown town; public ETown getTown ... possibleFriends; @ManyToMany(mappedBy = "blockedUserList") private List invisibleUsers; @ ManyToOne private ... ="postedMessages") private Player sender; @ ManyToOne private Player address; protected Message

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

AnnotationAttrRef jakarta.persistence.JoinColumn.table

to be in the primary table of the applicable entity. Default: If the join is for a OneToOne or ManyToOne ... bidirectional ManyToOne / OneToMany mapping using a join table, the name of the join table

AnnotationAttrRef jakarta.persistence.JoinColumn.name

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

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

Extra uninitialised entities spawned on merge()

In the following, Element is a base entity class, with a bi-directional @ ManyToOne -@OneToMany relationship Element owner - List ownedElements , and Example is a subclass entity with a relationship ... ;     private Element owner;         @ ManyToOne

@JoinColumn(nullable=false)

? This is an code example: //bi-directional many-to-one association to AlarmGroup @ ManyToOne ... . But you can use the optional element of the @ ManyToOne and @OneToOne annotations. Similarly

Merge Issue: Attempt to reuse an existing primary key value

; import org.junit.Test; import java.util.*; import javax.persistence. ManyToOne ; public class T1432y ... ;      @ ManyToOne (fetch = FetchType.LAZY, cascade = { CascadeType.ALL })  

AnnotationRef jakarta.persistence.JoinTable

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

EnumRef jakarta.persistence.CascadeType

JPA Enum CascadeType java.lang.Object ∟  java.lang.Enum ∟  jakarta.persistence.CascadeType Defines the set of cascadable operations that are propagated to the associated entity. The value cascade=ALL is equivalent to cascade={PERSIST, MERGE, REMOVE, REFRESH, DETACH }. See Also: ManyToOne

EnumRef jakarta.persistence.FetchType

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

AnnotationRef jakarta.persistence.MapsId

JPA Annotation MapsId Target: METHOD, FIELD Implemented Interfaces: Annotation Designates a ManyToOne or OneToOne relationship attribute that provides the mapping for an EmbeddedId primary key, an attribute within an EmbeddedId primary key, or a simple primary key of the parent entity. The value

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

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       

New entity objects are duplicated on merge cascading

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

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

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