posted 14 years ago
We're using annotations to map a class to a table in another schema, but the column names used in the queries generated by Hibernate are wrong, even when the column name is specified.
The hibernate query tries to load 'user_id', similarly the firstName, middleName and lastName are referred to as 'first_name', 'middle_name' and 'last_name' respectively.
The table already exists and is not created by Hibernate (it is SELECT only) and is running in MySQL 5.1 with Hibernate 3 and Spring.
I go around it by pointing it to a view in the remote schema instead, but I'd prefer it to work correctly.