-
Jan 7th, 2013, 07:03 AM
#1
DBRE version column data type mismatch
Hi All,
I have inherited a database ( postgres ) with a .Net application and we have to migrate the application to Spring. The .Net application was developed with nHibernate. We cant change the DB schema.
In the database, each table has a id ( integer ) primary key and a version ( smallint ) column. When we attempt to run the code generated by Roo DBRE + web mvc , we are getting the following error :
org.hibernate.HibernateException: Wrong column type in public.dbobject for column version. Found: int2, expected: int4
The version column which is of type smallint in the database, is mapped by DBRE to a Integer in Dbobject_Roo_Jpa_Entity.aj like shown below :
@Version
@Column(name = "version")
private Integer Dbobject.version;
1) I thik this is what's causing the "Found: int2, expected: int4" error, right?
2) How do we get DBRE to create version as Short instead of Integer?
3) Overall what is the best way of resolving this problem?
Thanks in advance..
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules