When the database reserved keywords as column names, the DDL script is not quoted

Description

A defect that has existed for more than 15 years was discovered. When column names use database reserved words, such as when `groups` is used as column names under mysql8, the generated SQL script cannot be executed in the database because the column names are not quoted

When the following configuration is set to true, it will cause new problems
`hibernate.globally_quoted_identifiers =true `
All quotes are too rude, my application will have another problem

The source of the error is the following two lines, it should be `!quoted`

https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/mapping/Column.java#L97

https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/mapping/Column.java#L105

Activity

Show:

Details

Assignee

Reporter

Worked in

Original estimate

Time tracking

No time logged1h remaining

Components

Affects versions

Priority

Created June 26, 2021 at 10:43 AM
Updated June 26, 2021 at 10:43 AM