ObjectDB Database Search

51-100 of 118 results

Merge with Parent/Child entities not possible

.persistence.MapKey; import javax.persistence. OneToMany ; import javax.persistence.Persistence; import javax ... {   @Id   @GeneratedValue   private long id;   @ OneToMany (fetch = FetchType.LAZY

TreeSet and compareTo() issue

through a collection field in another class that uses eager fetch: @ OneToMany (fetch = FetchType.EAGER ... valid:     @ OneToMany (fetch = FetchType.EAGER, cascade=CascadeType.PERSIST

Persisting collection where members are subclasses

OK, I have a number of classes which are all subclasses of Entry (e.g., Folder, Link, Book). In the Folder class, there is a @ OneToMany Map children If I store something in that map ... ;         @ OneToMany (cascade=CascadeType.PERSIST)    

composite index not used in query

we defined a composite index for class Action: @Index(name="ssst",members={"startDate","state","subType","type"}) and an index for the OneToMany @ OneToMany (fetch=FetchType.LAZY) @Index public List objectsInCharge = new ArrayList (); on running a query like select count(a) from Action a JOIN

LEFT (OUTER) JOIN problem when mappedBy is defined

invoices without items! Only invoices with items. When I remove mappedBy from @ OneToMany annotation ... public class Invoice { @ OneToMany (mappedBy = "invoice", fetch= FetchType.EAGER, orphanRemoval=true

LazyInitialization / join fetch

the fetch join? If so should I do to all fields of List , ie OneToMany or ... do to all fields of List , ie OneToMany or should also be done for joins ? Grateful. rafael_moreira Rafael

LAZY @ManyToOne field functions as EAGER

an unmapped @ OneToMany list is not still viewable, although a mapped @ OneToMany list is, which I

How to use JOIN FETCH?

.MapKeyTemporal; import javax.persistence. OneToMany ; import javax.persistence.Persistence; import javax ... ; @ OneToMany   @MapKeyTemporal(TemporalType.DATE)   private Map addressHistory = new HashMap

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

String code;     @ OneToMany (mappedBy = "user") @MapKey     private Map ... code;         @ OneToMany (mappedBy = "project") @MapKey   

PostUpdate collection null

; @ OneToMany (fetch=FetchType.EAGER)     private ArrayList myCollection = new ArrayList ... ;            @ OneToMany (fetch=FetchType.EAGER

Removing an entity throws exception

;     optional=false, orphanRemoval=true) private Address address; @ OneToMany (mappedBy = "customer", fetch= FetchType.LAZY) private List itemList; @ OneToMany (mappedBy = "customer

orphanRemoval = true not working when CascadeType.REMOVE is disabled

;   @ OneToMany (orphanRemoval = true)         private Set ... , addresses=[Address{name='name_2'}, Address{name='name_3'}]} I'm try use  @ OneToMany (cascade

mappedBy problem

If I put the mappedBy element to the @ OneToMany , the owned side (the many side) will never persist ! for example @Entity public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long id; public String name; @ OneToMany (targetEntity=Address.class,mappedBy="employee

Why are my Map entries not stored?

    private long id;     @ OneToMany (fetch = FetchType.EAGER ... the Explorer. itsme Martin Petzold I have now changed to and it is working: @ OneToMany (fetch

_PersistenceException: Type is not found on getSingleResult.

;  private Municipio lugarNacimiento;         @ OneToMany (mappedBy

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

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

Double persist of Entity field with Cascade.ALL

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

Performance and memory usage of queries

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

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

Using of Second Level Cache

myEntity2;       @ OneToMany     private List list; } btc_es BTC

Query over the keySet of a map field with collection parameter

; } @ OneToMany (cascade = CascadeType.ALL) public Map map = new HashMap (); } @Entity public static class

TemporalType injection with Calendar using JPA

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

Storing objects problem

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

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?

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

New to Product & Having An Issue

() { return name; } public void setName(String name) { this.name = name; } @ OneToMany (fetch=FetchType

Beginners questions

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

openejb jpa jaas module

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

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

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

Problem with @OrderBy

;   @ OneToMany (mappedBy="defect")     @OrderBy("seqRel, noteSeq

EM.find() is suddenly slower

= {CascadeType.REFRESH, CascadeType.DETACH }) private ModelElementImpl element; @ 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

Query only works correctly when debug printing results

@GeneratedValue private long id; private String reqLevelName = "DEF"; @ OneToMany (mappedBy

Maintaining referential integrity

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

Entity not removed 100%

When I remove an object from a class it get's removed but the other objects that had that object as an attribute still keep it although I am using @ OneToMany (cascade=CascadeType.ALL) This is what it remains when I check the removed object from another object's attributes     Unknown

Annotate a Map field with @ElementCollection or @Basic

and therefore excluded (as optimisation) from automatic cascading. You can also try @ OneToMany (fetch

Transaction isolation support?

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

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

Tracking changes to new collections (in enhancement mode) after flush

, CascadeType.DETACH }) private ModelElementImpl element; @ OneToMany (fetch = FetchType.EAGER, cascade ... ModelElementImpl element; @ OneToMany (fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH

NullPointerException on TreeSet load

    public static class MyEntity {         @ OneToMany (cascade=CascadeType ... {         @ OneToMany (cascade=CascadeType.PERSIST, fetch = FetchType.EAGER)  

ArrayIndexOutOfBoundsException on flush

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

new objects not available in mappedBy associations

Given a mappedBy association: e.g: @ OneToMany (mappedBy="department") public List employees;   creating a new mapped class, e.g. new Employee, won't result in this object being available in the same transaction: ie: for (Employee e : department.employee) won't include the new object

Eager Fetch of Map with Entities as Keys

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

[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)  

com.objectdb.o.InternalException: null

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

Enhanced classes problem

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