added missing hooks

Added the missing hooks that were present in Model:
beforeUpdate, afterUpdate, beforeInsert, afterInsert