-->
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.  [ 1 post ] 
Author Message
 Post subject: Auto-creating schema with order-by columns on many-to-many
PostPosted: Tue Feb 16, 2010 11:00 am 
Newbie

Joined: Tue Feb 16, 2010 10:54 am
Posts: 1
I have a mapping class which specifies a mapping relationship which looks like this:

<set name="groups" table="group_permission" order-by="updated">
<key column="permission_id"/>
<many-to-many column="group_id" class="Group"/>
</set>

The updated column is on the many-to-many join table group_permission. When I use hbm2ddl.auto to create the schema automatically obviously it has no way to know what the udpated column is and doesn't create it. Is there a way to make hbm2ddl.auto to create such meta columns on many-to-many SQL tables? If not then is there a way to do this manually in hibernate - corresponding to the SQL statement "alter table group_permission add column updated timestamp default now() on update now();"


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

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.