Bug looking up UUID with h2 on 2.9.0 #25535
Replies: 3 comments 2 replies
-
What import is required to support @ColumnDefinition in this case? |
Beta Was this translation helpful? Give feedback.
-
Sorry, that was a typo when I wrote it. It should say
|
Beta Was this translation helpful? Give feedback.
-
I had the issue when upgrading and I fixed it this way: https://github.com/quarkusio/quarkus/pull/24663/files#diff-e94ad5b9df019618c0f1b4db509b28dcd8ebfb74745f95cb5f06eac93fc2cbf7 . I agree it's not exactly ideal if you have a lot of UUIDs in your code base. @beikov it seems to be a recurrent problem, I don't know if we can improve the situation? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It seems like the h2 upgrade in 2.9.0 broke looking up UUID columns when they're automatically created.
Prior to h2 version 2, BINARY was just another name for VARBINARY., after version 2, BINARY and VARBINARY are now separate types with the former populating the database with 0 padded values. Since the UUID java type gets represented by default as a BINARY, all lookups fail.
Shouldn’t the default behavior be to create h2 columns using the UUID database type?
By making this simple change, everything works.
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions