[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3242) <any> mappings don't work if the type field comes from a typedef

nigel magnay (JIRA) noreply at atlassian.com
Wed Apr 16 10:56:33 EDT 2008


<any> mappings don't work if the type field comes from a typedef
----------------------------------------------------------------

                 Key: HHH-3242
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3242
             Project: Hibernate3
          Issue Type: Bug
          Components: core
    Affects Versions: 3.2.6
            Reporter: nigel magnay
            Priority: Minor


If I have
 <typedef name="oid_type" class="com.cswgroup.kms.hbm.OIDUserType"></typedef>

And a mapping containing 
  <any name="Resource"  meta-type="long" id-type="oid_type">
	
I get an error :
Caused by: java.lang.NullPointerException
	at org.hibernate.tuple.entity.EntityMetamodel.indicatesCollection(EntityMetamodel.java:392)
	at org.hibernate.tuple.entity.EntityMetamodel.indicatesCollection(EntityMetamodel.java:398)
	at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:215)
	at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
	at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
	at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
	
But if the mapping is changed to  
  <any name="Resource"  meta-type="long" id-type="com.cswgroup.kms.hbm.OIDUserType">

Then it appears to work correctly.

-- 
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