coleifer/peewee — Issue #35: Auto save() dirty objects on commit
Author: coderbuzz
Created: 2011-12-30 10:49:18+00:00
State: open

Hi, to speed-up my query tasks, by default I have turned-off autocommit to False in db configuration,
means we need to call db.commit() to commit the transaction

Found now behavior doesn't flush (save) dirty objects on commit.
Again, in sql-alchemy we don't need explicit call object.save() as we know there's dirty objects that need to be save() automatically on commit.

```python
try:
othermodel.create(blablafield = 'blabla value')

mymodel = MyModel.select().first() # hehe new stuff :D
mymodel.somefield = 'edit the field value' # dirty object
# mymodel.save() # maybe explicitly required only on autocommit scheme

db.commit()
except :
db.rollback()
```

I'm playing with more than 4 models in one task, which changing the field value anywhere,
it's a bit difficult to catch which object should call save() on the end of procedure block since changes could be applied on several place of code block logic