openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Wisniewski (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-241) Extra SQL on lazy CMR load
Date Sat, 19 May 2007 12:43:16 GMT
Extra SQL on lazy CMR load
--------------------------

                 Key: OPENJPA-241
                 URL: https://issues.apache.org/jira/browse/OPENJPA-241
             Project: OpenJPA
          Issue Type: Bug
          Components: sql
    Affects Versions: 0.9.8
         Environment: all
            Reporter: Rob Wisniewski


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.


Mime
View raw message