About fetch

forum_thread

Lazy loading does not work - crud takes long

tomee7.0.0SNAPSHOT,objectdb 2.6.4 The OneToMany Entities are filled with 40.000 Records and they have between 20-40 Columns. It takes over 50s to load all Project Enities that contains the OneToMany Relationships. It should be load lazy but i didnt know why the query fetch all the Data. ... It should be load lazy but i dont know why the query fetch all the Data. @ PostConstruct public void init ... = true , mappedBy = "project" , fetch = FetchType . LAZY ) private ... = true , mappedBy = "project" , fetch = FetchType . LAZY ) private ...

 
forum_thread

@ElementCollection of type enum

Hi! I have in an entity called User with the following field: @ElementCollection(fetch = FetchType.EAGER) private Set<UserPermission> permissions; package x.x.x.x public enum UserPermission { BASIC, COACH, ADMIN } Use case: there are users which contain the first 2 permissions (BASIC and COACH, so the first 2 entries). ... called User with the following field: @ElementCollection(fetch = FetchType.EAGER) private Set<UserPermission> permissions; ... and BASIC231. Conclusion: @ElementCollection(fetch = FetchType.EAGER) private Set<UserPermission> permissions; saves ...

 
forum_thread

Puzzler: Not getting cascades on read from Spring context

I've determined that the database is correctly initialized, looking at it from the Object Explorer, I can run the code that loads the database in a Junit test and it's initializing the children objects correctly, but in the application running in Jetty with Spring, fetching is not cascading. My best guess is that perhaps I have something misconfigured in my persistence.xml or my context.    -dh #1 2012-10-24 01:42 I've determined that the database is correctly initialized, looking at it from the Object Explorer, I can run ...

 
api-jdo

javax.jdo.Extent

Instances of the Extent class represent the entire collection of instances in the data store of the candidate class or interface possibly including its subclasses or subinterfaces.(Interface of JDO)

 
forum_thread

PostUpdate collection null

Hello, I have an entity MyEntity with a collection attribute myCollection. I have an EntityListener on MyEntity with a @PostUpdate method. When I try to access myCollection from the PostUpdate method, this collection is null. If I try to access the collection from the PreUpdate method, the collection is populated. The collection is eagerly fetched. public class MyEntity {     @OneToMany(fetch=FetchType.EAGER)     private ArrayList<OtherEntity> myCollection = new ArrayList<OtherEntity>(); ... class MyEntity {     @OneToMany(fetch=FetchType.EAGER)     private ... id ;   @ OneToMany ( fetch = FetchType . EAGER , cascade = CascadeType . ...

 
forum_thread

can't get HashMap out of the database

I'm trying to persist an Entity containing a HashMap. It stores the data in the database OK, but the map is always empty when I get the entity out of the database again. I've reproduced this problem in a simple variation of the Guestbook tutorial: Guest class: ===================== ... Try annotating the map with @OneToMany(fetch=FetchType.EAGER). Outside the DAO method only fields that have ... Date signingDate ; @ OneToMany ( fetch = FetchType . EAGER , cascade = CascadeType . ...

 
api-jdo

FetchGroup.DEFAULT

For use with addCategory and removeCategory calls.(Static Field of javax.jdo.FetchGroup)

 
api-jdo

getMaxFetchDepth()

Return the maximum fetch depth used when fetching instances.(Method of javax.jdo.FetchPlan)

 
api-jdo

setGroup(fetchGroupName)

Set the active fetch groups to the single named fetch group.(Method of javax.jdo.FetchPlan)

 
api-jdo

javax.jdo.annotations.FetchGroups

Annotation for a group of fetch-group objects(Annotation of JDO)