|
To clarify the use case in the ticket, no JPA annotations but HBM XML, I am not using any back-tick in my HBMs.
My findings so far (while I try to get a local hibernate-orm git tree to build and unit-test so new unit tests can be added) :
org.hibernate.mapping.Table#setName("`foo_My_table`") causes the Table instance to get quoted=true name="foo_My_table" (the back-tick quoting gets removed, I never configured the backticks in my HBM this got added by hibernate during startup) so when this is run through Table#getQuotedName(Dialect) the output is "\"foo_My_table\"" as the Dialect specific quotes are added back.
org.hibernate.mapping.Column#setName("bar_my_column") causes the Column instance to get quoted=false name="bar_my_column" (quoting does not exist on input, my <property name="bar_my_column" column="bar_my_column"/> also does not contain backticks). so when this is run through Column#getQuotedName(Dialect) the output is "bar_my_column" and no quoting is introduced, this the SQL output does not contain quoting for column names
so I am looking in the area of HbmBinder#bindColumns(...) at the time HBM parsing is done to check that the call into name = getObjectNameNormalizer().normalizeIdentifierQuoting( name ); is done for the columnName parsed from the HBM XML. I do not think this is the case which is the bug here.
|