bcosca/fatfree — pull request #574 by xfra35 (2014-03-17 08:10:16+00:00)
Title: SQL mapper: tweaks

Hi,
this pull request suggests 2 changes:

- `beforeinsert` and `beforeupdate` hooks to be called at the very beginning of the `insert()` and `update()` methods (cf. issue #525) otherwise there's no chance to modify the object before update.
- `afterinsert` and `afterupdate` hooks to be called only when INSERT/UPDATE statements actually occured. Same thing with the calculation of the last inserted id `_id`.