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
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.
Java 8, Hibernate 5.4.18, Database MySql 8.0.19.