[ 
https://issues.apache.org/jira/browse/OPENJPA-241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fay Wang updated OPENJPA-241:
-----------------------------

    Attachment: openjpa_241_1.patch

The attached patch addresses the following issues raised by Pinaki:

1. Should all the fields including superclass fields be considered for 
matching? getDeclaredFieldMappings() only return the fields declared in the 
current class.
2. Can be modified from linear scan to lookup. Please see 
ClassMapping.getField(String fieldName) or ClassMapping.getDeclaredField(String 
fieldName).
3. Test cases?

The test case will be attached to JIRA-292.

> 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: 1.0.0
>         Environment: all
>            Reporter: Rob Wisniewski
>            Assignee: Catalina Wei
>             Fix For: 1.2.0
>
>         Attachments: openjpa_241.patch, openjpa_241_1.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.

Reply via email to