Simplified creating & updating a record

- Deleted TRANSACTION (It was completely pointless in this case)
- Used `db.lastInsertRowId` instead of executing another query...

+ I didn't make any benchmark ,but I quess that if somebody is updating/creating many records (models) this improvement will affected a speed (At least a little bit).