- All Implemented Interfaces:
- org.hibernate.id.Configurable, org.hibernate.id.IdentifierGenerator, org.hibernate.id.PostInsertIdentifierGenerator
public class NativeIfNotAssignedIdentityGenerator
extends org.hibernate.id.IdentityGenerator
implements org.hibernate.id.Configurable
native-if-not-assigned
By setting the Hibernate configuration's primary key column to use a "native" implementation,
Hibernate ALWAYS generates the entity's id when it is being saved. There is no way to "override"
the generated id.
This IdentityGenerator allows a programmer to override the "generated" id, with an "assigned" id
at runtime by simply setting the primary key property.
- Author:
- paul.shemansky@gmail.com