-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Could not determine type for YEAR error
PostPosted: Tue Aug 09, 2005 6:11 pm 
Newbie

Joined: Tue Aug 09, 2005 6:02 pm
Posts: 5
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?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 6:32 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
I think it's complaining about the 'type="YEAR"' in your mapping file. Just remove that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.