I need help generating an HQL query :
String queryString = "from A_B_Link inner join"+
"A on A_B_Link.A_id=A.id "+
"B on A_B_Link.B_id=B.id"
The equivalent SQL query would be"
select * from A, B
where A.id=A_B_Link.A_id and B.id=A_B_Link.B_id;
Since I used Eclipse to generate POJO classes for my tables, I have many-to-many mapping for tables A and B.... so I have A.java and B.java, but no A_B_Links.java file.... But when I execute the query, does the program look for A_B_Links file?
The error I get is "org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: on near line 1, column 46 .......
Thanks.
|