[Hibernate-JIRA] Created: (HHH-2449) Lazy loading for one-to-one asociations
by jose (JIRA)
Lazy loading for one-to-one asociations
---------------------------------------
Key: HHH-2449
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2449
Project: Hibernate3
Type: New Feature
Components: core
Versions: 3.2.2
Environment: Hibernate 3.2.2
Reporter: jose
After read "Some explanations on lazy loading" and my tests I found a lossing feature in Hibernate (3.2.2).
one-to-one with lazy="proxy"_____________________________________________
Hibernate ALWAYS launch selects to know if one-to-one is null or can be proxied.
one-to-one with lazy="no-proxy"__________________________________________
Instrumentation allows to hibernate modify the getter to allows lazy loading on demand:
* but allways initialize ALL no-proxy relations (with first getter call)
-> must initialize ONLY the requested property
* never auto-initialize FETCH joins, ALWAYS doit on demand (if opened session)
-> must auto-initialize ONLY the FETCHED property
note: Can submit a fix for this? How?
NEW FEATURE: one-to-one with lazy="proxy" without multiple SELECTS______
If Hibernate adds join, for all one-to-one relations, to get the foreign-key of other tables, can check it to create a proxy or null.
note: that hibernate adds joins for hierarchy, why not for one-to-one relations?
This solution avoids:
* 'multiple subselects' after first select
* 'instrumentation' of bytecode
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
14 years, 8 months
[Hibernate-JIRA] Resolved: (HHH-1780) negation of EXISTS in hql query does not work
by Strong Liu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1780?page=c... ]
Strong Liu resolved HHH-1780.
-----------------------------
Resolution: Fixed
Fix Version/s: 3.6.7
4.0.0.next
patch applied, nice work Igor, thanks
> negation of EXISTS in hql query does not work
> ---------------------------------------------
>
> Key: HHH-1780
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1780
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2
> Reporter: Marton Papp
> Assignee: Strong Liu
> Fix For: 4.0.0.next, 3.6.7
>
> Attachments: hibernate-HHH-1780-fix.patch, hibernate-HHH-1780-fix.patch, hibernate-HHH-1780-test.patch
>
>
> Hello!
> I think I found a bug in Hibernate, in class org.hibernate.hql.ast.HqlParser.
> It is in the methtod:
> public AST negateNode(AST x)
> The switch lacks the node type: EXISTS.
> The default negateNode() implementation in org.hibernate.hql.antlr.HqlBaseParser seems to be broken by me, since it does not actually inverts the node but returns a node that is inverted. Or, to be more exact, the negation of OR and AND types are buggy, since they seem to assume that negateNode() will change the node itself, and so they simply discard its return value.
> I wish the branch for NOT was not commented out, since it would provide a workaround, but now i'm stuck.
> Regards,
> Marton
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[Hibernate-JIRA] Assigned: (HHH-1780) negation of EXISTS in hql query does not work
by Strong Liu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1780?page=c... ]
Strong Liu reassigned HHH-1780:
-------------------------------
Assignee: Strong Liu
> negation of EXISTS in hql query does not work
> ---------------------------------------------
>
> Key: HHH-1780
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1780
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2
> Reporter: Marton Papp
> Assignee: Strong Liu
> Attachments: hibernate-HHH-1780-fix.patch, hibernate-HHH-1780-fix.patch, hibernate-HHH-1780-test.patch
>
>
> Hello!
> I think I found a bug in Hibernate, in class org.hibernate.hql.ast.HqlParser.
> It is in the methtod:
> public AST negateNode(AST x)
> The switch lacks the node type: EXISTS.
> The default negateNode() implementation in org.hibernate.hql.antlr.HqlBaseParser seems to be broken by me, since it does not actually inverts the node but returns a node that is inverted. Or, to be more exact, the negation of OR and AND types are buggy, since they seem to assume that negateNode() will change the node itself, and so they simply discard its return value.
> I wish the branch for NOT was not commented out, since it would provide a workaround, but now i'm stuck.
> Regards,
> Marton
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months