[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5120) LazyGroup Loading Mechanism
Demidovich Artem (JIRA)
noreply at atlassian.com
Thu Apr 15 05:01:59 EDT 2010
LazyGroup Loading Mechanism
---------------------------
Key: HHH-5120
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5120
Project: Hibernate Core
Issue Type: Improvement
Components: core
Environment: Hibernate
Reporter: Demidovich Artem
Priority: Minor
I would like to suggest a new functionality, which could improve Lazy loading. For Example, I have bussines objects and there is an object named Company.
Company has many fields, but I can separate Company fields in two or three logical groups and those fields of the object can be groupped in LazyGroups (for example "LazyGroup1", "LazyGroup2"). Now if caller tries to get some field from the LazyGroup1 then Nibernate will load all fields from this group.
Just for example
Company Type LazyGroup
1. Name (string)
2. Postal Code (string)
3. Address (Address Object)
4. Wokers (Lazy Collection)
5. Contracts (Lazy Collection) (LazyGroup = 'LG1')
6. Clients (Lazy Collection) (LazyGroup = 'LG1')
7. BussinesInfo (string) (LazyGroup = 'LG2')
8. BussinesRegions (Lazy Collection) (LazyGroup = 'LG2')
8. BussinesPartners (Lazy Collection) (LazyGroup = 'LG2')
So, if I call BussinesInfo getter then Hibernate should load all fields in 'LG2' LazyGroup (BussinussInfo, BussinessRegions, BussinesPartners).
This improvement will descrease amount of sql queries, because hibernate will use one query for loading all fields from the lazy group rather than calling one query per field.
--
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