[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6724) AnnotationBinder and HbmBinder improperly set EntityPersisterClass upon class hierarchy
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Tue Oct 11 20:11:20 EDT 2011
AnnotationBinder and HbmBinder improperly set EntityPersisterClass upon class hierarchy
---------------------------------------------------------------------------------------
Key: HHH-6724
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6724
Project: Hibernate Core
Issue Type: Bug
Components: metamodel
Affects Versions: 4.0.0.CR4
Reporter: Emmanuel Bernard
Assignee: Emmanuel Bernard
Fix For: 4.0.0.next
In Hibernate Core 3.6, PersisterClassProvider (the father of PersisterClassResolver) was called before the Binder phase could set any default value (in particular in the inheritance case). This was done in EntityBinder.bindEntity() if @Persister was not explicitly set.
In Hibernate Core 4, such calls to PersisterClassResolver are done in PersisterFactoryImpl#createEntityPersister. This is after the Binder phase which sets persister values when mapping a class hierarchy (AnnotationBinder#bindClass line 608, 631 and 651).
Hibernate OGM is not given opportunity to override the value.
A fix for this involves not setting PersistentClass#setEntityPersisterClass in the Binders (unless explicitly set) and move the class hierarchy decision logic to PersisterClassResolver. Note that the initial PersisterClassResolver implementation was incomplete.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list