-->
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: @IndexedEmbedded or @Field (with EnumBridge) for an enum?
PostPosted: Wed Aug 22, 2012 3:44 pm 
Newbie

Joined: Fri Apr 09, 2010 3:55 pm
Posts: 8
Hiya,

If I have something like this:

Code:
@Enumerated(EnumType.STRING)
private Status status;


and I want to introduce Hibernate Spring to the mix, which is the preferred way?

Code:
@IndexedEmbedded
@Enumerated(EnumType.STRING)
private Status status;


or

Code:
@Field
@FieldBridge(impl = EnumBridge.class)
@Enumerated(EnumType.STRING)
private Status status;


Thanks! :-)


Top
 Profile  
 
 Post subject: Re: @IndexedEmbedded or @Field (with EnumBridge) for an enum?
PostPosted: Fri Aug 24, 2012 9:59 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

the latter and I don't think you need the explicit @FieldBridge.

--Hardy


Top
 Profile  
 
 Post subject: Re: @IndexedEmbedded or @Field (with EnumBridge) for an enum?
PostPosted: Fri Aug 24, 2012 4:16 pm 
Newbie

Joined: Fri Apr 09, 2010 3:55 pm
Posts: 8
Thank you!

:-)


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.