Hibernate version: 3.1
Mapping documents:
<!-- `has_price_flag` enum('Y','N') NOT NULL default 'N', -->
<property name="hasPriceFlag"
column="has_price_flag" type="rating" not-null="true"
update="false" access="field"/>
Name and version of the database you are using:
mySQL 4.0.2
<!-- `has_price_flag` enum('Y','N') NOT NULL default 'N', -->
I did read through the documentation, and I found this link:
http://www.hibernate.org/272.html
But this link seems to be for persisting a JDK 1.5 Enum class to the database.
I was also reading through the Professional Hibernate book and the HIA book, and it seems both these books don't cover 3.x version of Hibernate. I also looked through the forums, and I didn't see anything that would answer my question.
My real problem is that I am trying to take an existing database, that has a table with multiple enums in it. One field is as follows:
`has_price_flag` enum('Y','N') NOT NULL default 'N',
So, I want to map this in my hbm.xml file, and I need to know how I setup my VO class, and any other classes I might need. In the case of this one field: I have this class:
package com.mypackage.dataAccess.dvo;
public enum HasPriceFlag {Y, N;}
Any help with this would be much appreciated! Thanks!