-->
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.  [ 3 posts ] 
Author Message
 Post subject: Enumeration intrusion
PostPosted: Wed Apr 14, 2004 11:08 am 
Newbie

Joined: Tue Apr 13, 2004 10:21 am
Posts: 5
It seem that's hibernate is a little bit intrusif. If I want to refer to a type safe enum in an object persisted by hibernate, i must hinerit my enumeration Clase from persistantEnum which is a Hibernate Interface.
Is it planed to solve this issue, by using reflexion for example (using conventional toInt and fromInt methods) ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 14, 2004 12:09 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You can easily map a normal Typesafe Enumaration (thats a pattern, use Google) with a Hibernate UserType, non-intrusive.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Re: Enumeration intrusion
PostPosted: Wed Apr 14, 2004 4:31 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
Have a look at http://www.hibernate.org/172.html for workaround...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.