Hibernate events
I'm always having an argument with myself about how much intelligence to put in the database. I have a strong preference: none. I would rather work in Java and just let the database store data. But I always make an exception for database-generated identifiers, and then I start thinking that maybe I should write a trigger to let the database take care of timestamps, or recalculate a photo's total rating in photoSIG when someone ads a new critique, or... And then I start thinking that maybe I should do the opposite, remove the database-generated IDs, use UUIDs for everything, and really use the database just for storing data. For lots of domain objects I maintain two fields, "created" and "updated." You can probably figure out what they do. Throughout the photoSIG code I am forever updating the updated field. I decided to investigate whether I can use Hibernate to do this for me. I only really care about when the object was written to the database, n...