From 83a6822aa475397ac4639ce0dc45161e8f9fed85 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Fri, 2 May 2025 11:03:39 +0200 Subject: [PATCH] document documentation of Byte[], Character[] in JPA 3.2 --- .../src/main/asciidoc/introduction/Entities.adoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/documentation/src/main/asciidoc/introduction/Entities.adoc b/documentation/src/main/asciidoc/introduction/Entities.adoc index 0bc770b2476d..a4be5745b09d 100644 --- a/documentation/src/main/asciidoc/introduction/Entities.adoc +++ b/documentation/src/main/asciidoc/introduction/Entities.adoc @@ -534,11 +534,12 @@ The JPA specification defines a quite limited set of basic types: | Primitive wrappers | `java.lang` | `Boolean`, `Integer`, `Double`, etc | Strings | `java.lang` | `String` | Arbitrary-precision numeric types | `java.math` | `BigInteger`, `BigDecimal` +| UUIDs | `java.util` | `UUID` | Date/time types | `java.time` | `LocalDate`, `LocalTime`, `LocalDateTime`, `OffsetDateTime`, `Instant`, `Year` | Deprecated date/time types 💀 | `java.util` | `Date`, `Calendar` | Deprecated JDBC date/time types 💀 | `java.sql` | `Date`, `Time`, `Timestamp` | Binary and character arrays | | `byte[]`, `char[]` -| UUIDs | `java.util` | `UUID` +| Binary and character wrapper arrays 💀 | `java.lang` | `Byte[]`, `Character[]` | Enumerated types | | Any `enum` | Serializable types | | Any type which implements `java.io.Serializable` |==== @@ -549,6 +550,13 @@ The JPA specification defines a quite limited set of basic types: We're begging you to use types from the `java.time` package instead of anything which inherits `java.util.Date`. ==== +[WARNING] +==== +The use of `Byte[]` and `Character[]` as basic types was deprecated by Jakarta Persistence 3.2. +Hibernate does not allow `null` elements in such arrays. +Use `byte[]` or `char[]` instead. +==== + [CAUTION] // .Serialization is usually a bad idea ====