Plugins (1067)


Training and Consulting (40)



EPIC Poll

What is your favourite developer portal?

[ Results | Polls ]

Votes: 539
Comments: 0

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
maxxyme
4 Post subject: HS can't generate multiple class declaration mapping  PostPosted: 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..???
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits