Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

TypedQuery Returns no Results  RSS feed

Rob Hyx
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 as name left join 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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!