|
|
|
|
|
by dvdkon
247 days ago
|
|
SQLAlchemy has one strongly-held opinion, that there should be a 1:1 mapping between objects in a database and in memory. So if you query the database then modify the result, the change will automatically also be made in the DB. I strongly dislike this, since you always have to be careful not to make some unwanted change. When checking permissions, you have to check before you modify the object. You can't modify it and then run some permission checker. You also can't easily keep the old version around. Sadly it seems most ORMs follow this style, and that Django's is the odd one out. |
|