About lazy

manual

Retrieving JPA Entity Objects

Explains how to use JPA to retrieve entity objects from the database.... JavaDoc Reference Page... , can be considered the lazy version of find : Employee employee = em. getReference ... excluded from this automatic cascaded retrieval by using a lazy fetch type: @Entity javax.persistence.Entity JPA ...

 
forum_thread

Mapped (Inverse) LAZY @OneToMany vs. Unmapped LAZY @OneToMany

In the code example below (also attached) I would like to understand why I am able to print to console a lazy @OneToMany mapped field after a finding entity manager closes. There is a switch DO_VIEW_BEFORE_CLOSE, and when it is true the fields are accessed and output before the finding entity manager closes and as expected both a mapped @OneToMany list and an unmapped @OneToMany list are viewable: a.listA_mapped:[{A}[4]"ownedElement1", {A}[5]"ownedElement2"] a.listB_unmapped:[{B}[2]"b1", {B}[3]"b2"] ... like to understand why I am able to print to console a lazy @OneToMany mapped field after a finding entity manager closes. There is a ... is not visible/resolved, as one would expect for LAZY: a.listA_mapped:[{A}[4]"ownedElement1", {A}[5]"ownedElement2"] ...

 
forum_thread

Does ObjectDB support lazy loading?

I'm evaluating ObjectDB 2.0 RC1. Everything works fine except a lazy loading problem. I've a Parent class which contains List<Child>, marked with @OneToMany. After persisting a Parent object, (in the Explorer) I can see all the property values of the Child objects in the list. However, when the Parent object is read from EntityManager, all the properties except ID of the Child objects are null. The EntityManager is not yet closed when the getters are called.... ObjectDB 2.0 RC1. Everything works fine except a lazy loading problem. I've a Parent class which contains List<Child>, ... can be read. It seems to me that ObjectDB doesn't support lazy loading, am I right?   ...

 
forum_thread

LAZY @ManyToOne field functions as EAGER

In the code example below (also attached) I would like to understand why I am able to print to console a lazy @ManyToOne field after the entity manager closes. There is a switch DO_VIEW_BEFORE_CLOSE, and when it is true the fields are accessed and output before the finding entity manager closes and as expected both a LAZY @ManyToOne field and an EAGER @ManyToOne field are viewable: b.cLazy:{C}[2]"cLazy"
 b.cEager:{C}[3]"cEager" ... like to understand why I am able to print to console a lazy @ManyToOne field after the entity manager closes. There is a ... the finding entity manager closes and as expected both a LAZY @ManyToOne field and an EAGER @ManyToOne field are viewable: ... closes, when it is marked as @ManyToOne(fetch=FetchType.LAZY) ?   package com. greensoft . objectdb . test ...

 
issue

Navigation through lazy loading from Detached Objects

A main limitation of detached objects (as explained on the Detached Entities manual page) is: ... on the Object DB vs EclipseLink/TopLink: on accessing lazy loaded relationships outside a transaction, after a query, from Glassfish ... with the EntityManagerFactory and enable  lazy loading) - until serialization, which completes the detachment. It ...

 
forum_thread

Possible issue with LAZY Loading

Hi, We need lazy loading for one of our large data sets. When I run currently against both 2.4.2 and 2.4.3_01 the db is always returning everything, including the data marked as Fetch.LAZY.  I wrote the attached unit test, and then found this: http://www.objectdb.com/database/forum/9 As far as I can tell, my unit test is pretty much identical. Not sure why this doesn't work. Thanks Paul. ... Hi, We need lazy loading for one of our large data sets. When I run currently against both ... returning everything, including the data marked as Fetch.LAZY.  I wrote the attached unit test, and then found ...

 
forum_thread

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

Hi There I am using ObjectDB 2.6.3. I get the following Exception when I try to read my entities with a query where I have set to use LAZY initalization. It fails when it tries to set a 1:n member (e.g. a Modell has several Artikels) . When I remove the LAZY hint on the query execution it works. Any hints why this can happen? The Mapping of class Modell and its member: ... to read my entities with a query where I have set to use LAZY initalization. It fails when it tries to set a 1:n member (e.g. a Modell has several Artikels) . When I remove the LAZY hint (query.setHint("objectdb.result-fetch", "LAZY");) on the query ...

 
issue

Lazy retrieval by access not working correctly

I have a problem loading lazy associations by access/navigation with an @Embedded attribute containing an @ElementCollection which is lazy loaded.  I'm not sure if the same problem exists elsewhere.  Furthermore, if I set a breakpoint in the right spot in debug mode, everything works correctly.  Without the breakpoint, my lazy collection does not get loaded.  Here are code snippets which should reproduce the problem. ... I have a problem loading lazy associations by access/navigation with an @Embedded attribute containing an @ElementCollection which is lazy loaded.  I'm not sure if the same problem exists elsewhere.  ...

 
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. ... the OneToMany Relationships. It should be load lazy but i dont know why the query fetch all the Data. @ ... = "project" , fetch = FetchType . LAZY ) private List<Datapoint> datapoint ;   ...

 
issue

Lazy loading of mapped by (inverse) singular references

... ObjectDB ignores lazy setting of non collection mapped by (inverse) fields and loads them always eagerly. This is allowed by JPA since lazy is only hint but it is not efficient. The reason is that ...