Beginner |
|
Joined: Thu Sep 22, 2005 7:22 am Posts: 21
|
Hibernate version: 3.1-beta3
Mapping documents:
<hibernate-mapping>
<class name="se.liu.studorg.blaskan.web.data.staff.Node">
<id name="id">
<generator class="native"/>
</id>
<list name="children"
inverse="true"
cascade="all-delete-orphan">
<key column="parent" not-null="true"/>
<list-index column="name"/>
<one-to-many class="Node"/>
</list>
<many-to-one name="parent"
class="Node"
not-null="false" />
<property name="name" />
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close(): Using hivetranse
Full stack trace of any exception that occurs:
Association references unmapped class: Node
# org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2270)
# org.hibernate.cfg.HbmBinder.bindListSecondPass(HbmBinder.java:2121)
# org.hibernate.cfg.HbmBinder$ListSecondPass.secondPass(HbmBinder.java:2853)
# org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
# org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1005)
# org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:218)
# org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1120)
# net.sourceforge.hivetranse.transaction.hibernate3.SessionFactoryBuilderImpl.buildSessionFactory(SessionFactoryBuilderImpl.java:87)
# net.sourceforge.hivetranse.transaction.hibernate3.SessionProxyFactory.buildSessionFactory(SessionProxyFactory.java:155)
# net.sourceforge.hivetranse.transaction.hibernate3.SessionProxyFactory.createCoreServiceImplementation(SessionProxyFactory.java:100)
.
.
.
Name and version of the database you are using: mySQL 4.1
I can't get this simple tree structure to even create the schemas..
Isn't it possible to map recursively like this?
I remember seeing mappings like this, so I am pretty sure it works.
_________________ /ted
|
|