Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Enumerations in JPA

REDO LOGFeb 14 2013 — edited Feb 15 2013
Hi all
I have a question about enumerations,
class Test{

   public enum Gender{

     Male, Female
   }

@Enumerated(EnumType.STRING)
@Column(length=1)
private Gender gender;

}
my question is this correct?
my goal is to keep only one character of the enumration

thanks for help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2013
Added on Feb 14 2013
7 comments
4,705 views