-->
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: How to map enum to String field in database with XML config?
PostPosted: Fri Apr 04, 2008 8:19 am 
Newbie

Joined: Sun Mar 30, 2008 1:37 pm
Posts: 5
In one of my class I have field status which type is

Code:
public enum Status {
OPENED,
CLOSED;
}



I map it this way
<property name="status" not-null="true">
<type name="org.hibernate.type.EnumType">
<param name="enumClass">com.javaxshop.domain.manager.pojo.ShopOrderStatus</param>
<param name="sqlType">12</param>
</type>
</property>


But it generates it this way
status integer not null

But I want to have string type in Database except int type.

How I may get it?


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.