| I tried to upgrade the hibernate version from 4.3.11 to 5.2.2. My company's project has multiple schemas for the different projects but they all use the same configuration file for datasource connection and entities are marked with @Table annotation with the specified schema name for mysql. After upgrading to hibernate 5, while executing a named query the schema it refers to is the default schema from the jdbc connection url not from the schema attribute of the table annotation. The code is working fine with Hibernate 4. |