I\'m using Hibernate 3.6 and MSSQL 2012.
When executing this HQL
select tbl.state from Property tbl where tbl.state = 1 and tbl.entity.state = 1 and
When using HQL, always use proper aliases when performing join operations.Your query should be something like that:
select tbl.state
from Property tbl
left join tbl.entity entity
where tbl.state = 1
and entity.state = 1
and entity.className = 'com....'
and tbl.fieldName = 'fieldName'
Otherwise if you try to use tbl.entity.someProperty, in HQL, it will always create a crossJoin