[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4437) ToOneDelegateSessionImplementor breaks Hibernate.getClass(auditedEntity.proxyOfnotAuditedEntity)
Eugene Goroschenya (JIRA)
noreply at atlassian.com
Sun Sep 13 09:50:50 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eugene Goroschenya updated HHH-4437:
------------------------------------
Attachment: HHH-4437-envers-hibernate-3_3-fix.patch
HHH-4437-envers-hibernate-3_3-tests.patch
Attached [^HHH-4437-envers-hibernate-3_3-tests.patch] are changes to reproduce.
Attached [^HHH-4437-envers-hibernate-3_3-fix.patch] are changes to fix.
They both for http://anonsvn.jboss.org/repos/hibernate/core/branches/envers-hibernate-3.3
> ToOneDelegateSessionImplementor breaks Hibernate.getClass(auditedEntity.proxyOfnotAuditedEntity)
> ------------------------------------------------------------------------------------------------
>
> Key: HHH-4437
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4437
> Project: Hibernate Core
> Issue Type: Bug
> Components: envers
> Affects Versions: 3.3.x
> Reporter: Eugene Goroschenya
> Priority: Blocker
> Attachments: HHH-4437-envers-hibernate-3_3-fix.patch, HHH-4437-envers-hibernate-3_3-tests.patch
>
>
> Probably there is mistake in changes applied for HHH-4010 that leads to incorrect working of Hibernate.getClass(proxy) method.
> See ToOneDelegateSessionImplementor#doImmediateLoad(String entityName)
> ...
> Session session = versionsReader.getSession();
> return session.get(entityClass, (Serializable) entityId);
> ...
> It can return proxy but Hibernate SessionImplementor interface says
> /**
> * Load an instance immediately. This method is only called when lazily initializing a proxy.
> * Do not return the proxy.
> */
> public Object immediateLoad(String entityName, Serializable id) throws HibernateException;
> Probably solution is to use delegate.doImmediateLoad(entityClass, (Serializable) entityId) instead of session.get(entityClass, (Serializable) entityId)
--
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