Generator classes in Hibernate

Generator classes are used to generate the ‘identifier or primary key value‘ for a persistent object while saving an object in database. Hibernate provides different primary key generator algorithms. All hibernate generator classes implements hibernate.id.IdentifierGenerator interface, and overrides the generate(SessionImplementor,Object) method to generate the ‘identifier or primary key value‘. If we want our own user […]