How to define database generated column values as readonly fields in JPA and Hibernate?

Viewed 4191

With MariaDB 10.2 it's possible to define default value for Datetime e.g. created and lastModified.

How I should access this columns as readonly field? Because this values should only be under control of the database and should not be modified from code, but I want read access to this property in code.

2 Answers
Related