-->
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: Problem using @Enumerated(EnumType.STRING)
PostPosted: Mon Jun 18, 2007 10:09 am 
Newbie

Joined: Thu Oct 21, 2004 2:43 pm
Posts: 9
Hibernate version: 3.2.2

Mapping documents: Use of Annotations

Name of the database you are using: Oracle

Hi all,

I have a class that holds a status.
This Status has been implemented as an Enum class.

I wanted to map this as a "out of the box" String enumeration but after declaring the property with the following annotation :
@Enumerated(EnumType.STRING) : I get no string in my DB, I've tried to set the column to NVARCHAR2 but I just get one long string of characters as value...

What am i doing wrong here ?
In short, I just made a class A that extends from Enum and a class B that holds a property of type A mapped as stated above...

Or is there a smarter way to map Enumerations ?

Thx in advance.


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.