Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Take @Table/@Column annotations into account in JPA native queries #926
I'm generating Q classes from JPA entities using the maven JPAAnnotationProcessor. Normally, I use JPAQuery and everything works but I needed to UNION two queries so I tried to use JPASQLQuery.
Entities with names that map directly to its corresponding table work fine but if it's different then the "table is not found".
@Table(name="user") class User
works fine but
@Table(name="other_user") class User
will still try to generate SQL that refers to a table named
referenced this issue
Sep 7, 2014
I'm seeing a problem related to this in Version 3.6.9:
My entity has a many to one relation to another entity:
When i try to do a join, the on part is not mapped to the foreign key column:
This results in the query:
but it should be
I'm not sure if I do something wrong in the syntax of the query or if it's a QueryDsl issue.