gamechanger / mongothon

A lightweight Mongo object-document mapping abstraction layer over PyMongo
http://gamechanger.github.io/mongothon
MIT License
78 stars 19 forks source link

Make Model().update delegate to the Python dict API #19

Closed inlinestyle closed 10 years ago

inlinestyle commented 10 years ago

review @tleach

Make Model().update delegate to the Python dict API. Currently, Model().update overrides the dict API in favor of proxying Model.collection.update. This was nice, but ultimately the cost of not being able to treat Models like dicts was too high. This would change Models to have the following methods:

tleach commented 10 years ago

Couple of minor comments otherwise looks good. Feel free to merge once you've addressed them.

One thing which does occur to me is that for breaking changes like this (for which you've rightly incremented the version to 0.6) it might make sense to start maintaining some sort of basic changelog document. But, probably not worth worrying about for now.