Greetings. I'm hoping someone can point out the fault in my logic:
The actual query is more complex, but for the sake of brevity it looks like: select t from table t left join t.pendingemployee.name as name left join t.employee.name as _name where name LIKE '%Bob%' or _name LIKE '%Bob%'
The reason for two joins is one of them will always be null; it's a workflow. When the workflow reaches it's conclusion, the data is stored in the table of the second join, and the link to the former is removed from the table. But I want to search across both of them starting with the table. Furthermore, Employee is the superclass of PendingEmployee (not sure if that matters, but thought it was prudent to mention). Both are annotated with @Entity and @Table, and Employee is @Inheritance(strategy=InheritanceType.JOINED) and PE is @PrimaryKeyJoinColumn(name="id")
Anyway, this query returns no results, no errors, nothing.
Any help would be greatly appreciated. Thanks in advance.