openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catalina Wei (JIRA)" <>
Subject [jira] Closed: (OPENJPA-241) Extra SQL on lazy CMR load
Date Tue, 22 Jul 2008 18:01:31 GMT


Catalina Wei closed OPENJPA-241.

       Resolution: Fixed
    Fix Version/s: 1.2.0
         Assignee: Catalina Wei

Patch from Fay Wang has been committed in svn r678828

> Extra SQL on lazy CMR load
> --------------------------
>                 Key: OPENJPA-241
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.0.0
>         Environment: all
>            Reporter: Rob Wisniewski
>            Assignee: Catalina Wei
>             Fix For: 1.2.0
>         Attachments: openjpa_241.patch
> This issue is similar to openjpa-134 but occurs in a slightly different manner.
> I've got two entities:
> Account (LAZY) (one) <--------> (many) (EAGER) Holding
> So when I load account nothing is loaded from holdings, but once I load the holding,
I observe each holding separately making a database call to load it's eager account.  This
is quite alot of overhead, and through a simple conditional check we should be able to avoid
it.  Essentially if we're loading an entity from a CMR, and the multiplicity of the field
from the bidirectional relationship is one, then we don't need to load the data for that entity.
 We did something similar to this in openjpa-134 when everything was eager (essentially avoiding
the extra left out joing back into account).  Can we avoid these separate calls?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message