Joined: Tue Oct 21, 2003 4:49 am Posts: 2
|
Hi,
I have successfully used Middlegen to create a number of *.hbm.xml files against tables my development schema.
I am running hbm2java from ant to generate the java classes and all seems to work well except I get a couple of errors when it tries to process 2 mappings files for tables that have a one to one relationship with each other. The generated files contain :
<!-- associations -->
<!-- bi-directional one-to-one association to ContactGroup -->
<one-to-one
name="contactGroup"
class="iat.hibernate.ContactGroup"
outer-join="auto"
constrained="true"
/>
and
<!-- associations -->
<!-- bi-directional one-to-one association to Group -->
<one-to-one
name="group"
class="iat.hibernate.Group"
outer-join="auto"
/>
I am not sure why but when the generator runs it gives me the following :
compile-hibernate:
[java] (hbm2java.ClassMapping 658 ) Could not find UserType: iat.hibernate.Group. Using the type 'iat.hibernate.Group' directly instead. (java.lang.ClassNotFoundException: iat.hibernate.Group)
[java] (hbm2java.ClassMapping 658 ) Could not find UserType:
iat.hibernate.ContactGroup. Using the type 'iat.hibernate.ContactGroup' directly instead. (java.lang.ClassNotFoundException: iat.hibernate.ContactGroup)
However - 2 classes do indeed get generated i.e Group.java and ContactGroup.java. Within them there appear to be references to the related class but I am very new to Hibernate and am not really sure what I am looking for i.e
Group.java
/** nullable persistent field */
private iat.hibernate.ContactGroup contactGroup;
ContactGroup.java
/** nullable persistent field */
private iat.hibernate.Group group;
Do I need to be concerned with the error I am seeing - at first glance it would appear to be generating code (all the other tables/relationships seem fine - just these 2) ???
Thanks
|
|