Showing posts with label hibernate mapping trigger. Show all posts
Showing posts with label hibernate mapping trigger. Show all posts

Tuesday, May 5, 2009

Hibernate mapping for trigger populated columns

Suppose you have table columns whose values are populated by triggers. For example, createdBy, updatedBy, createdDate, & updatedDate. The following Hibernate mapping indicates that these columns are managed by database. The mapping is also "trigger friendly" - Hibernate will retrieve the values automatically. There is no need for an extra explicit SELECT.