posted 9 years ago
Yes, in your mapping you can set a default, you can set a formula, anything such that when it saves your users don't have to enter the data, but Hibernate will do it for you. You can even put database specific codewords in that formula and Hibernate will pass it directly through to the database. It also can call an insert trigger. Also in most databases you can set a default value, so for a date in Oracle you can have a default value of date() and when you first insert a record it will put today's date into the record.