Skip to content

Conversation

@cristof
Copy link
Contributor

@cristof cristof commented Feb 15, 2025

Added UUID support, using binary storage when the pair database-jdbc driver supports it, and string storage otherwise.
Binary storage is implemented as an DbDictionary property, defaulting to false, and true for PostgreSQL, H2 and HSQL databases.

Generated UUID value is a type 4 uuid, and storage of string representation is made, per spec, using its canonical representation.

Tested new features agains Postgresql 13 to 17, H2 1 and H2 2, current UUID capable HSQLDB and previous UUID not capable HSQLDB, MariaDB lts and latest, MySQL lts and latest. Could not test against Oracle.

Please be kind with this one. I may have missed a lot.

* added basic support for UUID as string or uuid field, per db support
* added GenerationStrategy.UUID support using UUID-4 random
* Allows usage of UUID as a basic type
* Allows usage of UUID as identity type
* Allows GenerationType.AUTO and GenerationType.UUID usage on String and UUID fields
* Generates type 4 UUID for @GeneratedValue String and UUID fields
* Storage UUID fields as binary data on supporting pair db/jdbc driver
* Storage UUID fields as canonical string representation when database or jdbc driver does not support UUID binary usage.
* Updates manual
Copy link
Contributor

@solomax solomax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As always great PR :))
Thanks a million! :)

@solomax solomax merged commit 6f4cf5b into apache:master Feb 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants