Fix release announcement paragraph about assigned generated ids

This commit is contained in:
Marco Belladelli 2024-03-21 13:11:36 +01:00 committed by Steve Ebersole
parent 1d9f4fe55f
commit 1e95a8a567
1 changed files with 11 additions and 3 deletions

View File

@ -146,15 +146,23 @@ delete from Person p where p.association.someAttr = 1
[[manually-assigned-generated-ids]] [[manually-assigned-generated-ids]]
== Manually Assigned Identifiers with @GeneratedValue == Manually Assigned Identifiers with custom `IdentifierGenerator`s
Manually assigned identifier values can now be used with `GeneratedValue` identifiers. Manually assigned identifier values can now be used with custom `IdenfierGenerator`s thanks to the new `allowAssignedIdentifiers()` method.
[source,java] [source,java]
---- ----
class MyGenerator implements IdentifierGenerator {
...
@Override public boolean allowAssignedIdentifiers() {
return true;
}
}
@Entity @Entity
@GenericGenerator( type = MyGenerator.class, name = "my_generator" )
class Book { class Book {
@Id @GeneratedValue @Id @GeneratedValue( generator = "my_generator" )
Integer id; Integer id;
... ...
} }