Regression Issue Hibernate 7.x - HTE (temporary) tables use Java field name instead of Column name

In Hibernate 7.x, there is a change in creating temporary tables (HTE) for batch inserts. Hibernate reads raw Java field names instead of real column names during creation of HTE tables. So if you have different column names, e.g.

@Column(name = "DESCRIPTION_")
private String description;`

HTE table is created with column “description” without underscore. If you have column f.e. “UID_” to prevent usage of DB keyword, Hibernate won’t create the table at all and application may crash in runtime.
The same code runs correctly on Hibernate 6.x
There is already existing issue for this in Jira, with different description and reproducer project, but there is no any answer.

Is this an intended behavior change or a regression? Would be possible to fix it?

Thanks for raising awareness. I did not notice, but clearly this is a bug. Would be a good chance for someone from the community to let an AI attempt to fix this.

Thanks, here for cross reference: HHH-20343 Fix temporary table column names regression by haj0136 · Pull Request #13196 · hibernate/hibernate-orm · GitHub

Sorry, it’s my first contribution to Hibernate, do I need to do anything else to get approval for Jenkins CI, or just wait for review?

In general, you wait for a review, but I am onto your PR already. I just figured out that there might be a “safer” way to implement this and am investigating this now.