VampBoy wrote:
I think the "missing" part from my query would be the last WORKFLOW_TYPE_ID should probably be this.WORKFLOW_TYPE_ID but I believe that hibernate will just imply this anyways.
Perhaps that's my problem. I'm using MySQL, and I don't believe it supports any magic keyword to refer to the outer table. In your example, "this" is your keyword. In MySQL, I would have to refer to the table name by it's name.
Since Hibernate is generating the query on the fly, and refers to the table by an alias, I cannot predict what table name to use!
Any other ways around this? I realize this is perhaps a DB-specific problem, but surely I'm not the first to tackle this.
Thanks for any ideas,
Norman