Hey there,
I was using HRE to access a Oracle DB. There where several tables I selected for reverse engineering. I've done this with the "Eclipse Hibernate Tools". The creation of the table.java and the tableHome.java (the DAOs) was successfull. (I've just had to set the right package name, everything else was done correct.)
Now I've tried to run the app. As the sessionFactory should be created several errors occured. The reason for this errors where dependencies between the tables. When table1.hbm.xml was proceeded, a reference to table2 was found and vice versa.
Code:
Exception in thread "main" org.hibernate.MappingException: Association references unmapped class: TFtyp
at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2036)
at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2497)
at org.hibernate.cfg.HbmBinder$SecondPass.doSecondPass(HbmBinder.java:2468)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:884)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:999)
I could resolve the problem by coping all hbm.xml-files into one file. But i think this is not a good solution.
My question is: How do i declare a typ forward? And why is HRE generated code not completely runable right after the generation of the classes?
Hibernate version:
3
native language:
german