Hi, I was wondering if anyone can help me solve this problem:
This is my HQL:
SELECT COUNT(obj.id) FROM MyObject AS obj WHERE obj.otherObject.id like '%example%'
This is what gets generated from hibernate via debug statement:
select count(myobject0_.id) as col_0_0_ from MYOBJECT myobject0_ where myobject0_.id like '%example%'
It looks like hibernate disregarded the otherObject. The otherObject is an object attribute within MyObject class, which contains an id field.
Is this an error or am I mapping it wrong? I'm mapping otherObject with the JoinColumn attribute. Thanks.
|