I had a similar issue and found the same thing that you did. The classes that I am using have composite keys, so I have methods within the classes that return a specific property from within the key. However, that won't work in HQL - I think we need to use direct properties only. So, for example if I have
classes QO, which has a primary key with properties j and q, and I want to refer to property q of the PK, even if I have a getQ() method, I have to say
Code:
where qo.comp_id.q = :value
Thanks for posting what you did. I'm trying to pull a group of records out of a set of 100K records, and the only way I can do it that I can see is by using HQL to grab just what I need from the database. I was stuck on the syntax for using the comp_id properties until I saw this thread.
Dave