MikeHT wrote:
In your Meeting class did you intend to have @Table(name="METTING")
Hi MikeHT, by mistake i created the table name in DB as METTING instead of MEETING so I have mentioned the exact table name in Meeting class.
But the problem is hibernate does not consider the second AND condition where I say subject = 'blah'. I think what happens is, hibernate will return Employee entities based on the name and whenever you want to refer to Meetings associated with those employees hibernate will use their PK and returns meetings. I am not sure about the logic but it looks like that. But my requirement is to get only those employees for whom meeting subject is Local (or any value).