Skip to content

Commit 16dbe5b

Browse files
committed
spec UUID support (mapping to varchar)
see jakartaee#151 and jakartaee#152.
1 parent f821d0a commit 16dbe5b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/src/main/asciidoc/ch11-metadata-for-or-mapping.adoc

+11
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,11 @@ protected String name;
617617
protected String getName() { return name; }
618618
----
619619

620+
If the persistence provider stores a value of type _java.util.UUID_ in
621+
a column of type _VARCHAR_ or equivalent, the value must be stored in
622+
its canonical representation, unless the application explicitly indicates
623+
that some other representation is preferred.
624+
620625
==== Cacheable Annotation
621626

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

1863+
However, if the persistence provider stores a value generated according
1864+
to the _UUID_ strategy in a column of type _VARCHAR_ or equivalent, the
1865+
value must be stored in its canonical representation, unless the
1866+
application explicitly indicates that some other representation is
1867+
preferred.
1868+
18581869
[source,java]
18591870
----
18601871
@Target({METHOD, FIELD})

0 commit comments

Comments
 (0)