[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4036) EntityMetamodel entityNameByInheritenceClassNameMap field used inconsistently

Heiko Hüter (JIRA) noreply at atlassian.com
Mon Jan 18 09:31:31 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35261#action_35261 ] 

Heiko Hüter commented on HHH-4036:
----------------------------------

any progress with this bug? I just checked with hibernate 3.5-beta3 and it still exists:

Caused by: org.hibernate.HibernateException: Unable to resolve entity name from Class [de.novasib.ttsib5.hbm.SYSADM5.Otrwwegenr] expected instance/subclass of [de.novasib.ttsib5.hbm.SYSADM5.TtsibObjekt]
	at org.hibernate.tuple.entity.PojoEntityTuplizer.determineConcreteSubclassEntityName(PojoEntityTuplizer.java:362)
	at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3839)
	at org.hibernate.impl.StatelessSessionImpl.getEntityPersister(StatelessSessionImpl.java:406)
	at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:203)
	at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:241)
	at org.hibernate.type.EntityType.getIdentifier(EntityType.java:430)
	at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:101)
	at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2145)
	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2391)
	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2802)
	at org.hibernate.impl.StatelessSessionImpl.insert(StatelessSessionImpl.java:115)

> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list