You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Albert Lee (Updated) (JIRA)" <ji...@apache.org> on 2012/02/07 16:52:59 UTC
[jira] [Updated] (OPENJPA-2099) Reuse relationship selection
[ https://issues.apache.org/jira/browse/OPENJPA-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee updated OPENJPA-2099:
--------------------------------
Fix Version/s: (was: 2.2.0)
2.3.0
> Reuse relationship selection
> -----------------------------
>
> Key: OPENJPA-2099
> URL: https://issues.apache.org/jira/browse/OPENJPA-2099
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.3.0
>
> Original Estimate: 1,008h
> Remaining Estimate: 1,008h
>
> Related entities are often loaded via a separate select operation when an unloaded field is accessed. The select operation for a relationship field structurally (i.e. which tables it joins to or what columns it selects) is invariant at instance level. Only thing that changes across entity instances is the foreign/primary key identifier values used in joining. The major computation cost is paid to analyze to build the select structure by analyzing the mapping metadata of class/field involved. As noted, this computation is invariant for each instance access except the primary/foreign key values involved.
> However, the core infrastructure for this frequent operation (because it is carried out whenever a relationship field is loaded for every instance) is not designed for reuse. The select gets constructed every time, the class/field mapping metadata gets analyzed every time, before the select is executed on the database.
> What is required to avoid this repeated and unnecessary cost is to reuse a select instance computed for every relationship field only once but binding different parameters on every execution.
> The task is non-trivial because of the select abstraction (a highly complex and critical data structure) is not designed with such parameter rebinding in mind.
> This issue attempts to remedy that limitation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira