Hi All,
I am using hibernate mapping in a project in Java and I have an error that I cannot figured out. I have several tables that includes column names all in lower case (e.g. db_id). To use them in Java, in my .hbm.xml file I am mapping them with the following line:
Code:
<id name="dbId" type="long" column="DB_ID">
I haven't got any error until now. Even if I use upper case above (column="DB_ID"), mapping was successfull. However, I now get a missing column error when I try to running the project. The error line is like:
Code:
org.hibernate.HibernateException: Missing column: DB_ID in public.x.account
at org.hibernate.mapping.Table.validateColumns(Table.java:277)
When I change the column name from db_id to DB_ID manually in pgAdmin or Navicat(I am using PostgreSQL), this error disappears and the next column name gives error. I have tens of tables and hundreds of column names. I have also many .hbm.xml files for mapping. (This is a part of a big project.) So I do not want to change all column names manually or change the all column attributes in .hbm.xml files.
What can I do to make it case insensitive?