We are using custom hibernate table generator for our primary key like below,
@Id
@GenericGenerator(
name = "primary_id",
strategy = "com.common.identity.IdGenerator"
)
@GeneratedValue(
generator = "primary_id"
)
@Column(
name = "pk_id"
)
protected Long pkId
Also we use liquibase for our database migration. Is there any way to integrate the above generator into liquibase insert changeset?
If not, is there anyway to call a java class to get a value for specific column in insert query.
<update tableName="primary_id">
<column name="next_val" valueComputed="call java class to get value"/>
</update>