Hello guys,
I am trying to map a view, which has three pairs of id/value from different
tables. I can generate the POJO from my table/view using middle gen, compile
and deploy my project normally. But when I try to use this POJO in
myDaoHibenate class to place a simple query it fails.
java.sql.SQLException: Invalid column name idTable1
org.hibernate.exception.SQLGrammarException: could not execute query
All POJO attributes/gets has the same tags...
/**
* @ hibernate.id generator-class="assigned"
* @hibernate.property column="id_table1"
*/
public Long getIdTable1() {
When I look at the generated hbm the only id is the first attribute of my
POJO. I know that the error has something to do with the missing column for
the @hibernate.property tag. But if I put it I will get a duplicated column
mapping. I also tried to put column in @ hibernate.id and remove @
hibernate.property but it doesn't worked, only the first is taken.
BTW, I am using MS SQLServer 2005.
Thanks for anything,
Francisco