A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
[Hibernate] Should I use enum to mapping the column?
Joined: Apr 27, 2004
May 25, 2011 19:26:36
I have a table as below
SEQ_NO VARCHAR2(10) PK ORDER_NO VARCHAR2(10) BILL_TYPE VARCHAR2(1)
For the Bill_TYPE column , the value 0、1 and 2 represent different bill type.
Should I use an enum for the column mapping or only use the normal
for the column mapping?
I think the java string for the column mapping is simpler than enum mapping in the application.
But use enum can avoid assign wrong type value in the code.
Can someone give me other suggestions?
My Way,My Pace
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: [Hibernate] Should I use enum to mapping the column?
Registering IN OUT parameter
Hibernate Inheritance Mapping Question !
hibernate mapping files for enumerated strings.
JPA Annotation @Column + column defination
How to use a Timestamp as the Identifier
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015