About FetchType

forum_thread

persisting object with long[][] arrays of array

Hi, I have an object I am trying to persist (java) - It has several fields of type long[][]. It is taking very long to persist and sometimes never finish - it hangs on getTransaction().commit(); Here is the object: ... . Entity ; import javax. persistence . FetchType ; import javax. persistence . Id ; import ... ; @ OneToMany ( fetch = FetchType . EAGER , cascade = CascadeType . ALL ) ...

 
forum_thread

significant performance decrease

we are using objected in embedded mode (on OS X and WINDOWS). The database increased now to around 400000 entities of one class (database file size around 1.5 GByte). The response time of standard queries increased with this database size to an unacceptable rate (several seconds compared to around 30% when the number of entities was just half of the current). We tried to optimize the cache settings, current objectdb.conf is: <!-- ObjectDB Configuration --> <objectdb> ... @ OneToMany ( fetch = FetchType . LAZY ) public List<Action> actions = ... @ OneToMany ( fetch = FetchType . LAZY ) public List<ObjectNode> ... @ OneToMany ( fetch = FetchType . LAZY ) public List<ObjectNode> container ...

 
manual

Retrieving JPA Entity Objects

Explains how to use JPA to retrieve entity objects from the database.... fetched. See JavaDoc Reference Page... = FetchType javax.persistence.FetchType JPA enum Defines strategies for fetching data from the ...

 
api-jpa

javax.persistence.FetchType

Defines strategies for fetching data from the database.(Enum of JPA)

 
api-jpa

JPA Annotations for Relationships

Reference (JavaDoc) of JPA 2 relationship annotations, including @ManyToMany, @ManyToOne, @OneToMany, @OneToOne, @OrderBy and @MapKey.... javax.persistence.CascadeType javax.persistence.FetchType Additional annotations are supported by ObjectDB for ...

 
issue

New entity objects are duplicated on merge cascading

When merge is cascaded to a new entity object that has not been persisted yet - it becomes persisted twice. This was demonstrated by a Java EE application in this forum thread but may be reproduced also in a simple console test case: ... = CascadeType . ALL , fetch = FetchType . EAGER ) private List<Chapter> ... @ OneToOne ( fetch = FetchType . LAZY , cascade = CascadeType . ALL ) ...

 
forum_thread

How to Remove records from many to many relationship tables in JPA

Hello All, I am getting the constraint violation exception whil deleting the entries I have Relation tables    TransportationEvent  and Conclusion  , relations like ... ... @ ManyToMany ( fetch = FetchType . EAGER , cascade = CascadeType . PERSIST ... .... @ ManyToMany ( fetch = FetchType . LAZY , cascade = CascadeType . PERSIST ...

 
forum_thread

Problem with @Basic(fetch = FetchType.LAZY)

I have a class where two fields are annotated with @Basic(fetch = FetchType.LAZY) due to them containing quite long Strings and me loading ALL entities of the database on application startup (swing app) This class should hopefully demonstrate the problem: ... where two fields are annotated with  @Basic(fetch = FetchType.LAZY) due to them containing quite long Strings and me loading ALL ... ; @ Basic ( fetch = FetchType . LAZY ) private String description ; @ ...

 
forum_thread

find() cost unreasonable time!

Hi, I make a full binary tree of 4095 node, I check the first 9 node, but the root cost 24 seconds, why? Result: ... ( mappedBy = "parent" , fetch = FetchType . EAGER ) protected List<Nodes> Sons ; ... . Entity ; import javax. persistence . FetchType ; import javax. persistence . GeneratedValue ; ...

 
forum_thread

Merge with Parent/Child entities not possible

Can you please tell me why the following unit test ends with "[ObjectDB 2.5.7_02] javax.persistence.RollbackException"? ... ; import javax. persistence . FetchType ; import javax. persistence . FlushModeType ; ... @ OneToMany ( fetch = FetchType . LAZY , cascade = CascadeType . ALL , ... @ ManyToOne ( fetch = FetchType . LAZY , cascade = { CascadeType . ...