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
|
|