Skip to content

document deprecation of Byte[], Character[] in JPA 3.2 #10103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion documentation/src/main/asciidoc/introduction/Entities.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`
|====
Expand All @@ -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
====
Expand Down
Loading