-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: composite-id and hbm2dll
PostPosted: Fri Jan 20, 2006 2:38 pm 
Newbie

Joined: Wed Jan 18, 2006 2:19 pm
Posts: 14
Hi, I have got a class with mapping
Code:
<hibernate-mapping>
    <class name="Reservation" table="reservation">
       
        <composite-id name="key" class="ReservationPK">
            <key-many-to-one name="user" class="User"/>
            <key-many-to-one name="item" class="Item"/>
        </composite-id>       

        <property name="resDay" not-null="true"/>
   
    </class>
</hibernate-mapping>

and in the configuration
<property name="hbm2ddl.auto">create</property>
but hibernate doesn't create table "reservation". what is the problem, pls?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 23, 2006 7:37 am 
Newbie

Joined: Wed Jan 18, 2006 2:19 pm
Posts: 14
I thing that using composite-id is quite common, so I'd like to ask, wheter you make database schema externally, or with hbm2dll (and in this case I have something wrong in my code, because the table with composite table is'nt created)..


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.