[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4036?page=c...
]
Steve Liles commented on HHH-4036:
----------------------------------
We encountered the same problem on updating from 3.2.5 to 3.2.7. It looks like this was
introduced by the fix for HHH-3515, which was included in 3.2.7 and 3.3.2 (see
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/hibernate/core/branches/Branch...).
I'm not familiar with Jira, and I can't find how to change the Affects Version/s
of this issue unfortunately.
EntityMetamodel entityNameByInheritenceClassNameMap field used
inconsistently
-----------------------------------------------------------------------------
Key: HHH-4036
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4036
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Reporter: Jeremy Stone
After upgrading (from 3.3.0.SP1) to 3.3.2.GA we have started getting the follow stack
trace logged:
org.hibernate.HibernateException: Unable to resolve entity name from Class
[com.cyclone.netPrefect.admin.restriction.complex.TimeSpanRestrictionItemEntity] expected
instance/subclass of [RestrictionItem]
at
org.hibernate.tuple.entity.PojoEntityTuplizer.determineConcreteSubclassEntityName(PojoEntityTuplizer.java:363)
at
org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3643)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1375)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:203)
at
org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:535)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:103)
... etc, etc
The com.cyclone.netPrefect.admin.restriction.complex.TimeSpanRestrictionItemEntity is
mapped (with entity name TimeSpanRestrictionItem) as a joined subclass of the entity named
RestrictionItem.
I have had a look at the Hibernate source for 3.3.2.ga and it looks like problem is the
way that the org.hibernate.tuple.entity.EntityMetamodel is using it
entityNameByInheritenceClassNameMap field:
* Puts to the map are based on PersistentClass.getMappedClass() as a key - a Class
object
* Gets from the map (in findEntityNameByEntityClass method) are using the class
name
Presumably (given the name of the map field) both put and get should be using the class
name.
--
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