You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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".
Example:
@Table(name="user")
classUser
works fine but
@Table(name="other_user")
classUser
will still try to generate SQL that refers to a table named User and fail.
Activity
timowest commentedon Sep 30, 2014
Released in 3.5.0
schragmanuel commentedon Nov 17, 2015
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.
viaco2ove commentedon Oct 21, 2021
I'm seeing the same problem related to this in Version 4.40:
Then I found the problem,need this dependency
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl