Skip to content

Commit

Permalink
spec UUID support (mapping to varchar)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Jan 14, 2022
1 parent 6a3e09b commit 4cacebc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/src/main/asciidoc/ch11-metadata-for-or-mapping.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,11 @@ protected String name;
protected String getName() { return name; }
----

If the persistence provider stores a value of type _java.util.UUID_ in
a column of type _VARCHAR_ or equivalent, the value must be stored in
its canonical representation, unless the application explicitly indicates
that some other representation is preferred.

==== Cacheable Annotation

The _Cacheable_ annotation
Expand Down Expand Up @@ -1855,6 +1860,12 @@ _java.util.UUID_, the _AUTO_ strategy is equivalent to _UUID_.
This specification does not define the exact
behavior of these strategies.

However, if the persistence provider stores a value generated according
to the _UUID_ strategy in a column of type _VARCHAR_ or equivalent, the
value must be stored in its canonical representation, unless the
application explicitly indicates that some other representation is
preferred.

[source,java]
----
@Target({METHOD, FIELD})
Expand Down

0 comments on commit 4cacebc

Please sign in to comment.