Skip to content

Commit 3c144ab

Browse files
committed
document documentation of Byte[], Character[] in JPA 3.2
1 parent a624b2d commit 3c144ab

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

documentation/src/main/asciidoc/introduction/Entities.adoc

+9-1
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,12 @@ The JPA specification defines a quite limited set of basic types:
534534
| Primitive wrappers | `java.lang` | `Boolean`, `Integer`, `Double`, etc
535535
| Strings | `java.lang` | `String`
536536
| Arbitrary-precision numeric types | `java.math` | `BigInteger`, `BigDecimal`
537+
| UUIDs | `java.util` | `UUID`
537538
| Date/time types | `java.time` | `LocalDate`, `LocalTime`, `LocalDateTime`, `OffsetDateTime`, `Instant`, `Year`
538539
| Deprecated date/time types 💀 | `java.util` | `Date`, `Calendar`
539540
| Deprecated JDBC date/time types 💀 | `java.sql` | `Date`, `Time`, `Timestamp`
540541
| Binary and character arrays | | `byte[]`, `char[]`
541-
| UUIDs | `java.util` | `UUID`
542+
| Binary and character wrapper arrays 💀 | `java.lang` | `Byte[]`, `Character[]`
542543
| Enumerated types | | Any `enum`
543544
| Serializable types | | Any type which implements `java.io.Serializable`
544545
|====
@@ -549,6 +550,13 @@ The JPA specification defines a quite limited set of basic types:
549550
We're begging you to use types from the `java.time` package instead of anything which inherits `java.util.Date`.
550551
====
551552

553+
[WARNING]
554+
====
555+
The use of `Byte[]` and `Character[]` as basic types was deprecated by Jakarta Persistence 3.2.
556+
Hibernate does not allow `null` elements in such arrays.
557+
Use `byte[]` or `char[]` instead.
558+
====
559+
552560
[CAUTION]
553561
// .Serialization is usually a bad idea
554562
====

0 commit comments

Comments
 (0)