hibernate-orm icon indicating copy to clipboard operation
hibernate-orm copied to clipboard

HHH-16531 HHH-18004 ColumnDefinitions should respect @Column(columnDefinition)

Open quaff opened this issue 4 months ago • 4 comments

https://hibernate.atlassian.net/browse/HHH-16531 https://hibernate.atlassian.net/browse/HHH-18004

quaff avatar Apr 10 '24 05:04 quaff

OK, this LGTM now. Thanks!

gavinking avatar Apr 10 '24 09:04 gavinking

OK, this LGTM now. Thanks!

Updated, fix that column not updated if columnDefinition added and differs to inferred type but the inferred type is equals to actual type in database, please review again.

quaff avatar Apr 10 '24 10:04 quaff

JDBC type names and codes are chaos, It wasted my several days, this may be my final attempt, I chose another safer way that differentiate updating from validating schema which should ignore user-specified definition, It will minimize impact.

Meanwhile I added a dedicate field columnDefinition instead of existing sqlType to store user-specified definition, It's not required(not confirmed) but worthwhile to not mix user-specified and inferred one.

WDYT @gavinking

quaff avatar Apr 16 '24 02:04 quaff

It fix https://hibernate.atlassian.net/browse/HHH-18004 also.

quaff avatar Apr 24 '24 02:04 quaff