-->
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: Columns order in database
PostPosted: Wed Aug 11, 2010 9:55 am 
Newbie

Joined: Wed Aug 11, 2010 9:44 am
Posts: 1
Location: Paris, France
Hi,

I'm currently using the xml mapping files to create the tables on the database, however I found a problem that I would like to specify the order the fields columns are created in my database and I dont find a way... I'lll post an example:

this is my mapping file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.xxx.xxx.server.xxx.xxx.dto">
<class name="UserService" table="user_service">
<composite-id class="UserServicePK" mapped="true">
<key-property column="user_service_guid" length="36" name="userServiceGuid" type="java.lang.String"/>
<key-property column="user_service_type_id" name="userServiceTypeId" type="java.lang.Integer"/>
</composite-id>
<property column="alias" length="256" name="alias" type="java.lang.String"/>
<property column="primary" length="36" name="primary" type="java.lang.String"/>
<property column="secondary" length="36" name="secondary" type="java.lang.String"/>
</class>
</hibernate-mapping>

When my tables are generated user_service_type_id is on the second column but I need it to be on the 4th, How can I achieve this?

Thanks,
Ceclia


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.