| Author |
Message |
|
|
|
Post subject: HS can't generate multiple class declaration mapping
Posted: Jan 24, 2008 - 09:10 AM
|
|
Joined: Jan 15, 2008
Posts: 5
|
|
Here is an Hibernate mapping file provided by the Hibernate example doc (here: http://www.hibernate.org/hib_docs/v3/re ... derproduct )
I explicitly added the XML header for purpose.
| Code: | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="Customer" table="customers">
<meta attribute="sync-DAO">true</meta>
<id name="id">
<generator class="native"/>
</id>
<property name="name"/>
<set name="orders" inverse="true">
<key column="customer_id"/>
<one-to-many class="Order"/>
</set>
</class>
<class name="Order" table="orders">
<meta attribute="sync-DAO">true</meta>
<id name="id">
<generator class="native"/>
</id>
<property name="date"/>
<many-to-one name="customer" column="customer_id"/>
<list name="lineItems" table="line_items">
<key column="order_id"/>
<list-index column="line_number"/>
<composite-element class="LineItem">
<property name="quantity"/>
<many-to-one name="product" column="product_id"/>
</composite-element>
</list>
</class>
<class name="Product" table="products">
<meta attribute="sync-DAO">true</meta>
<id name="id">
<generator class="native"/>
</id>
<property name="serialNumber"/>
</class>
</hibernate-mapping> |
Problem is that the Hibernate Synchronizer do not generate class files according to this mapping...
I also tried to split them into three separate mapping files (Order.hbm.xml Customer.hbm.xml & Product.hbm.xml) but it doesn't work either...
How to fix this..??? |
|
|
| |
|
|
|
 |
|
|
| |