BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. Scrum
  2. Apache Maven 2
  3. Essential MySQL
  4. Node.js
  5. Groovy
  1. jQuery Selectors
  2. Ajax
  3. Java
  4. Spring Config.
  5. Java Concurrency

Link Details

If you don't vote, who will? Login and vote now.
Link 481931 thumbnail
User 433640 avatar

By intesar
via mdshannan1.blogspot.com
Published: Sep 07 2010 / 10:39

How to use Enums in JPA
  • 12
  • 1
  • 2068
  • 10

Comments

Add your comment
User 186143 avatar

majson replied ago:

0 votes Vote down Vote up Reply

Nothing more than in jpa doc.

User 236075 avatar

henk replied ago:

0 votes Vote down Vote up Reply

This is indeed a little too basic for most developers. I was expecting some additional info like mapping your own ordinal or taking advantage of native enums in a DB. Yet, maybe some absolute beginner will find a need for this, so I voted the article up anyway ;)

User 433640 avatar

intesar replied ago:

0 votes Vote down Vote up Reply
User 226303 avatar

devdanke replied ago:

0 votes Vote down Vote up Reply

I definitely like the idea of using a short string (as short as possible) to map an enum to a database column, rather than using a number. It's easier to make sense of a string indicating the meaning of the enum compared to a cryptic number.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.