I have use columnDefinition
to specify default value for a column, however it does not store default value it stores null only,
Please help regarding this,
Your default value is defined in database, so Hibernate doesn't use it. The default value is set by database, but the entity you created is already in hibernate cache (it can be session cache or L2 cache).
If you load the entity it comes from Hibernate cache rather from database.
To solve this problem invoke do one of:
session.refresh(yourEntity)
@PrePersist
listener