Add hooks when inserting/updating/deleting