-->
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: How to preserve table column order for new schema.sql
PostPosted: Mon Jun 18, 2007 7:39 am 
Newbie

Joined: Wed Jun 13, 2007 1:10 pm
Posts: 2
Location: London, UK
Hi,

We've recently upgraded to Hibernate 3 from 2 but doing this has introduced us a new problem. The schema being generated by the hbm2dll is now altering the column positions. For example we have Table Animal with cols name, type, colour. The schema being generated after the upgrade is creating an ordering of type, colour, name for table Animal :~ Unfortunately trying to migrate data is causing errors because of this ordering issue. I have had a look the documentation online and though the Java Persistence book, but to no avail. Any help or suggestions are greatly appreciated.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 3:50 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
It should just define the columns as listed in hbm.xml

Any chance your are using annotations ? Then the ordering is under the mercy of the implementing vm.

_________________
Max
Don't forget to rate


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.