[hibernate-issues] [JIRA] (HHH-14120) Issue with hibernate-ddl-auto=update when mapping entity to a view. Error trying to generate foreign key constraint on a view
Dawid Popczyk (JIRA)
jira at hibernate.atlassian.net
Mon Jul 27 04:59:57 EDT 2020
Dawid Popczyk ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5f1e957d70fb250022a678bc ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMTQxMjI0YjdhNzM4NGY2NDg2MjU3NjRlNzc3YzM0OTciLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14120?atlOrigin=eyJpIjoiMTQxMjI0YjdhNzM4NGY2NDg2MjU3NjRlNzc3YzM0OTciLCJwIjoiaiJ9 ) HHH-14120 ( https://hibernate.atlassian.net/browse/HHH-14120?atlOrigin=eyJpIjoiMTQxMjI0YjdhNzM4NGY2NDg2MjU3NjRlNzc3YzM0OTciLCJwIjoiaiJ9 ) Issue with hibernate-ddl-auto=update when mapping entity to a view. Error trying to generate foreign key constraint on a view ( https://hibernate.atlassian.net/browse/HHH-14120?atlOrigin=eyJpIjoiMTQxMjI0YjdhNzM4NGY2NDg2MjU3NjRlNzc3YzM0OTciLCJwIjoiaiJ9 )
Issue Type: Bug Assignee: Unassigned Created: 27/Jul/2020 01:59 AM Environment: Java 8, Hibernate 5.4.18, Database MySql 8.0.19. Priority: Major Reporter: Dawid Popczyk ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5f1e957d70fb250022a678bc )
Lately I have been upgrading a legacy project from hibernate 5.0.12 to 5.4.18.
In it we had entities mapped to a database views. The project is written in Grails but I reproduced the issue in
Spring Boot link: https://github.com/ddpopczyk/hibernate-ddl-auto-issue
I get the following exception
java.sql.SQLException: 'test_db.invoice_to_project_match' is not BASE TABLE
A @Subselect annotation can be used to bypass this but it's problematic due to using Gorm for mappings in the project. I'd prefer not to mix in annotation approach in to the project.
( https://hibernate.atlassian.net/browse/HHH-14120#add-comment?atlOrigin=eyJpIjoiMTQxMjI0YjdhNzM4NGY2NDg2MjU3NjRlNzc3YzM0OTciLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14120#add-comment?atlOrigin=eyJpIjoiMTQxMjI0YjdhNzM4NGY2NDg2MjU3NjRlNzc3YzM0OTciLCJwIjoiaiJ9 )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100140- sha1:fbb0377 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200727/7ca063c9/attachment.html
More information about the hibernate-issues
mailing list