ObjectDB Database Search

101-150 of 163 results

TemporalType injection with Calendar using JPA

(TimePeriod id) { this.id = id; }   @ OneToMany (cascade=javax.persistence.CascadeType.ALL,fetch=javax

Is there a way to set EAGER fetch on all "ToMany" collection relationships

Given that the default seems to be FetchType.LAZY for all collections @ OneToMany and @ManyToMany. Such as a configuration option. Instead of having to explicitly set fetch in annotation code in every relationship. webel Dr Darren Kelly No. There is no such configuration option, since having EAGER

OrphanRemoval not working?

Dear all, I have entities Invoice and InvoiceItem, their relation is defined: public class Invoice implements Serializable { ... @ OneToMany (mappedBy="invoice", fetch=FetchType.EAGER,              orphanRemoval=true, cascade=CascadeType

Items in list are doubled, when the entity class is not enhanced

id; @ OneToMany (mappedBy = "customer",fetch= FetchType.EAGER,       

find() cost unreasonable time!

) private int id; @ManyToOne @JoinColumn(name="parent") protected Nodes parent; @ OneToMany (mappedBy

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

Maintaining referential integrity

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

Storing objects problem

adding an annotation to a reference:   @ OneToMany (cascade=CascadeType.PERSIST)   

Double persist of Entity field with Cascade.ALL

bookTitle; @ OneToMany (cascade= CascadeType.ALL, fetch= FetchType.EAGER) private List chapters; The Chapter

Possible issue for JPQL IS EMPTY expression

class MyEntity { @ OneToMany (mappedBy="myentity") ArrayList others = new ArrayList (); void

Example database world.odb

the relationships OneToMany and ManyToMany? I want to see a working example :-) Robin_2005 Kompan Serge

Problem with bidirectional link

(I had raised this issue in the past and have finally had time to come back to it and strip down the classes to a minimum). The problem seems to lie in having bidirectional links (viz, I have @ OneToMany Map children and @ManyToOne Entry parent in my classes. I've attached the offending classes

Detaching objects after JOIN FETCH

Hi, I have a question about detaching objects after issuing query with JOIN FETCH. Let's say I have two classes: public class A { @ManyToOne B bClass } public class B { @ OneToMany (fetch = FetchType.LAZY, cascade = CascadeType.ALL) List aClasses; } Now, I want to fetch all B classes

Trouble bug on explorer

allowIdWaitMe; @OneToOne(fetch = FetchType.EAGER) private Language mainLanguage; @ OneToMany (fetch

Merge of entity classes with "mapped by" very slow

Hi, I have found a strange behavior when merging entities with "mapped by" set on @ OneToMany relation. Even if object is fetched with find on the same transaction, merge is very slow. It's because on merge every single relation marked as LAZY is fetch from database. Attached two examples

Relationship Annatations

hi,   what is the purpose of annotating a field with a RDB relationship shuch as OneToMany . ManyToMany etc? sprintf Reuben Alfred Using these annotations is optional in ObjectDB but required by standard JPA. You still need these annotations in ObjectDB to specify cascading / fetch policy and other settings. support Support

Selective merge/cascade of detatched entity

I'm having an issue with my application, and I'm hoping you guys will be able to help. Please forgive typos and obvious errors, I'm having to retype from a non-internet connected network. A contrived example is: @Entity public class Salesman { private String name; @ OneToMany (fetch=FetchType.EAGER

openejb jpa jaas module

String mailAddress; @OneToOne private Settings settings; private String phoneNumber; @ OneToMany

Transaction isolation support?

own defined as @ OneToMany (fetch=FetchType.LAZY) List bookList; (And in this example, there is only 1 object in

_PersistenceException: Type is not found on getSingleResult.

;  private Municipio lugarNacimiento;         @ OneToMany (mappedBy

Attempt to remove a detached entity object (error 613)

to remove the object ... ? In my opinion, one child ( a list ) with OneToMany and orphanRemoval

OEM licencing limitation

// enhanced entity public final class Test { // non enhanced entity Internal @ OneToMany (fetch

@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

Error during cascaded merge

"}),}) public class Unit implements Serializable, Comparable { ... @ OneToMany (mappedBy = "unit", cascade

removed objects stay with null field values in the reference

; ... @ OneToMany (fetch=FetchType.LAZY) public Set workflow = new HashSet (); When we remove an object

@Lob @Basic(fetch = FetchType.LAZY) is loaded when it's not needed

Hello. I have a class Thing that contains OneToMany list of classes Photo. Photo contains  @Lob @Basic(fetch = FetchType.LAZY) private byte[] content; And after some queries with Thing (but without loading content of the photos) I get java.lang.OutOfMemoryError: Java heap space

List always null

; @ OneToMany (targetEntity = Noticia.class, mappedBy = "categorias", cascade = CascadeType.PERSIST

Performance and memory usage of queries

javax.persistence.FlushModeType; import javax.persistence. OneToMany ; import javax.persistence

Possible cause for "Enhancement of type ... is old and cannot be used"

: FAILS on @ OneToMany with @TableGenerator/strategy = GenerationType.TABLE (www.objectdb.com

LifeCycle Event with Embeddable classes

Hello, is there a way that lifecycle events like prepersist or preupdate are also fired for embeddable classes, not just for entities? My case looks as follows: @Entity public class Foo { @Id @GeneratedValue private Long id; private String description; @ OneToMany (cascade = CascadeType.ALL, fetch

Remove not working

(); emf.close(); } @Entity public static class A { @ OneToMany (mappedBy="a", cascade=CascadeType

Failed to write the value of field using reflection (error 363) on LAZY fetch

hints? The Mapping of class Modell and its member: @Entity class Modell { ... @ OneToMany (fetch

Retrieval by Access bug?

Dear Sirs, I have an object A, that has a OneToMany FetchType.EAGER List of objects B, that has a field with a reference to an object C. I have this code: ClassA objectA = em.find(ClassA.class, 1); for (ClassB objectB : objectA.getListB()) {     ClassC objectC = objectB

Using of Second Level Cache

myEntity2;       @ OneToMany     private List list; } btc_es BTC

Database Inconsistency or corruption

markedDeleted = false;   @ManyToOne   private Project project;   @javax.persistence. OneToMany

NullPointerException in ENH.g(ENH.java:401)

.handleOrphans(Entity.java:170) This happens when I try to read a @ OneToMany list collection

ObjectDB 2.6.9_06 (embedded): Cascading merge resulting in duplicate objects

This issue maybe related to issue #110 (http://www.objectdb.com/database/issue/110). Because that issue has been closed as "fixed", I am reporting this new issue. This is my class definition: @Entity public abstract class Person {     @ OneToMany (fetch=FetchType.EAGER, cascade

Beginners questions

") @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ OneToMany (fetch=FetchType.LAZY,cascade

Relationships and tracking changes

= GenerationType.AUTO) private Long id; @ OneToMany (fetch=FetchType.LAZY,cascade=CascadeType.ALL, mappedBy

Foreign key constraint issue

    @GeneratedValue     private long id;     @ OneToMany

[ObjectDB 2.2.5_02] Unexpected exception (Error 990) com.objectdb.o.InternalException: java.lang.NullPointerException: null

; } @ OneToMany (cascade=javax.persistence.CascadeType.ALL,fetch=javax.persistence.FetchType.EAGER

Navigation through lazy loading from Detached Objects

;           @ OneToMany (cascade=CascadeType.PERSIST)  

ArrayIndexOutOfBoundsException on flush

to in the first exception is stored in a HashMap object within the parent entity: @ OneToMany

New entity objects are duplicated on merge cascading

;       @ OneToMany (cascade= CascadeType.ALL, fetch= FetchType.EAGER

Issue with cascade delete & add/remove

;   private String name = null;         @ OneToMany

Eager Fetch of Map with Entities as Keys

id = 1;         @ OneToMany (fetch=FetchType.EAGER)   

Weird issue with variable naming

.persistence. OneToMany ; import javax.persistence.Persistence; import javax.persistence.Tuple; import javax

JPQL support for mapped by (inverse) collections

;    @ OneToMany (mappedBy="a")         ArrayList list

Enhanced classes problem

and annotations: @ OneToMany (fetch = FetchType.EAGER, mappedBy = "jobInfoId")  // relation

com.objectdb.o.InternalException: null

= Payment.Periodicity.QUARTERLY;     @ OneToMany (mappedBy = "customer", fetch