-->
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.  [ 1 post ] 
Author Message
 Post subject: hbm2java and a column named password
PostPosted: Wed Jun 17, 2009 3:47 pm 
Newbie

Joined: Wed Jun 17, 2009 3:35 pm
Posts: 3
I am using the hbm2java tool to generate the Java code associated with a SQL Server database.
One of the tables in the database has a field called 'PASSWORD' that is defined as nvarchar(64) NOT NULL.
When I run hbm2java on this table this value is defined as 'Serializable' with the getter/setter set I would expect.
The getter/setters also get annotated with @Column(name = "PASSWORD" nullable = false)

Up to this point, everything is going as I would expect it.

However, when I attempt to publish this code, I get an exception in the entityManagerFactory, to whit:

Code:
Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: PASSWORD, expected: varchar(64)


Has anyone seen this behavior and, more importantly, does anyone know how to fix this exception?

I cannot change the database schema (I don't own the database).

Thanks for any suggestions.


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

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.