[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5240) FetchProfile should also support LAZY
Marc Schipperheyn (JIRA)
noreply at atlassian.com
Thu May 20 06:18:11 EDT 2010
FetchProfile should also support LAZY
-------------------------------------
Key: HHH-5240
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5240
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.5.2
Reporter: Marc Schipperheyn
Currently initial support for FetchProfile.JOIN is available and SELECT and SUBSELECT are planned. I would like to make the case for including LAZY.
Basically JOIN, SELECT and SUBSELECT assume the default setting is lazy and depending on profile a different execution mode is selected.
The following example shows why you are sometimes forced to select EAGER and would benefit from resetting to LAZY in some cases. We have an entity User with a collection Roles (e.g. Admin, Editor etc).
Some users have multiple roles.
User is stored in the session and we frequently access the roles collection so we can't make it lazy.
User is also an eager attribute for Order of which there are many, so we need pagination. However, when we select orders, the eager relation with Roles leads to an expansion of the result set. Each Order row get #roles times the number of rows. Very undesirable and not so easy to fix.
The ability to set the Fetchprofile for orders to Lazy would be a solution here.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list