Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:2.1.8
Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping package="com.nyker.test.hibernate.bookbiz">
<!-- composite-id ignored default package declaration BUG! -->
<class name="TitleAuthor" table="TITLEAUTHORS">
<composite-id name="id" class="com.nyker.test.hibernate.bookbiz.TitleAuthorId">
<key-many-to-one name="author" class="com.nyker.test.hibernate.bookbiz.Author" column="au_id"/>
<key-many-to-one name="title" class="com.nyker.test.hibernate.bookbiz.Title" column="title_id"/>
</composite-id>
<property name="au_ord" type="integer"/>
<property name="royaltyper" type="float"/>
</class>
</hibernate-mapping>
Comment:
Inside composite-id it simply ignored <hibernate-mapping package="com.nyker.test.hibernate.bookbiz">, so only way get hbm2java to generate correctly with regard to package is to specify full package names inside <composite-id> for each class mentioned.