globally_quoted_identifiers is not honored on second-pass CopyIdentifier during schema creation

Description

When using globally_quoted_identifiers and hbm2ddl that involves create, global quotes is not being taken into account.

A class that has an @MapsId does not retrieve the quoting when declaring it's primary key
I've traced the issue to org.hibernate.cfg.CopyIdentifierComponentSecondPass:197
JoinColumn.getName() uses an unquoted response, even when refers to a column name that should be quoted.

I Will update the issue providing a Test case

Environment

HSQLDB Dialect integrated with hibernate

Status

Assignee

Unassigned

Reporter

Xian Boullosa

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.4.2

Priority

Major