-->
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: Hibernate ignoring @Column annotations
PostPosted: Fri Apr 06, 2007 4:48 am 
Newbie

Joined: Thu Mar 29, 2007 4:50 pm
Posts: 2
I'm testing some simple EJB 3.0 entity beans with Hibernate and I have them working apart from the fact that hibernate is creating new columns in my tables, rather than using the column names I have specified.

Here's a sample method:

@Column(name="date_reserved")
public Date getDateReserved()
{
return dateReserved;
}

Hibernate is creating a new column called "dateReserved" rather than using the existing "date_reserved" column. Basically, it seems to be ignoring the @Column annotation.

Is there a setting I have to enable to make Hibernate respect this annotation?

Thanks,

Andy.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 5:13 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You probably have mixed field and getter annotations, you should make a choice and always annotated the same kind of artefact

_________________
Emmanuel


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.