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.