Hi ..
I am using Hibernate 3.0 with Mysql 4.1.11. I read a date (year, month, day separately) from a logfile and store it in a table. The table declaration for the same is:
<class name="PerformanceLog" table="PerformanceLog">
<id name="logId" column="logId" type="long">
<generator class="increment"/>
</id>
<property name="projectName" column="projectName"/>
<property name="projectInstance" column="projectInstance"/>
<property name="accessYear" column="year" type="YEAR"/>
<property name="accessMonth" column="month"/>
<property name="accessDay" column="day"/>
</class>
In my Java code, I store the data into the table as follows:
HibernateManager.store(name, instance, year, month, day);
where year, month and day are int and name, instance are String.
After running this program I get the error
Initial SessionFactory creation failed.org.hibernate.MappingException: Could not determine type for: YEAR, for columns: [org.hibernate.mapping.Column(year)]
How can I get rid of it?
|