pyeve / eve-sqlalchemy

SQLAlchemy data layer for Eve-powered RESTful APIs
http://eve-sqlalchemy.readthedocs.io
Other
232 stars 70 forks source link

PUT must drop/recreate item in the same transaction #65

Closed goneri closed 9 years ago

goneri commented 9 years ago

So far, PUT was calling replace() to drop, commit, recreate the item. By doing this, we can get the situation where the initial drop break the foreign keys of the other tables. Instead, if we do the drop/recreate in the same transaction, the constraint engine will ignore the unstable situation.

This commit extend the code coverage:

See: https://www.sqlite.org/pragma.html

goneri commented 9 years ago

coveralls is on crack again :)

mmiz commented 9 years ago

Looks like this fixes the situation i mentioned here: https://github.com/RedTurtle/eve-sqlalchemy/issues/64

goneri commented 9 years ago

@mmiz, thanks for the feedback.

goneri commented 9 years ago

@amleczko, can you please have a look at the PR?

amleczko commented 9 years ago

I will check it next week

goneri commented 9 years ago

@amleczko for the record, I use this branch daily since august with without any problem.

amleczko commented 9 years ago

right @goneri, thanks

goneri commented 9 years ago

thanks @amleczko.

amleczko commented 9 years ago

I have merged it to develop branch and will release soon.