Anssi Kääriäinen
6b4834952d
Fixed #16649 -- Refactored save_base logic
...
Model.save() will use UPDATE - if not updated - INSERT instead of
SELECT - if found UPDATE else INSERT. This should save a query when
updating, but will cost a little when inserting model with PK set.
Also fixed #17341 -- made sure .save() commits transactions only after
the whole model has been saved. This wasn't the case in model
inheritance situations.
The save_base implementation was refactored into multiple methods.
A typical chain for inherited save is:
save_base()
_save_parents(self)
for each parent:
_save_parents(parent)
_save_table(parent)
_save_table(self)
2013-03-14 11:01:47 +02:00
..
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-03-04 13:30:59 -03:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-03-09 12:38:45 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-11 21:07:19 +01:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-03-13 12:44:24 +02:00
2013-02-26 14:36:57 +01:00
2013-03-11 19:42:59 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-14 11:01:47 +02:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-27 10:02:07 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-11 15:38:53 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-11 14:48:53 +01:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-03-11 15:10:58 +01:00
2013-03-11 15:10:58 +01:00
2013-02-26 14:36:57 +01:00
2013-03-11 17:46:56 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-11 15:04:05 +01:00
2013-02-26 14:36:57 +01:00
2013-02-28 15:28:13 +01:00
2013-03-10 17:31:11 -03:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-02 10:29:03 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-13 23:25:26 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-11 23:30:02 +01:00
2013-02-26 14:36:57 +01:00
2013-03-02 10:29:02 +01:00
2013-03-13 23:25:26 +01:00
2013-02-26 14:36:57 +01:00
2013-03-01 09:35:18 +01:00
2013-02-26 14:36:57 +01:00
2013-03-14 11:01:47 +02:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-03-13 10:44:49 +02:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-11 14:48:53 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-08 10:11:45 -05:00
2013-02-26 14:36:57 +01:00
2013-03-11 14:48:53 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-11 14:48:53 +01:00
2013-03-02 10:29:02 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-13 23:25:26 +01:00
2013-02-26 14:36:57 +01:00
2013-03-13 23:25:26 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-03 16:10:11 -03:00
2013-02-26 14:36:57 +01:00
2013-03-03 18:44:06 -03:00
2013-02-26 14:36:57 +01:00
2013-02-26 16:02:24 +01:00
2013-03-02 02:41:14 -05:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-13 15:17:40 +01:00
2013-03-14 11:01:47 +02:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-03-13 18:19:29 +01:00
2013-03-10 17:31:11 -03:00
2013-03-06 16:22:06 -08:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-26 14:36:57 +01:00
2013-02-28 15:28:13 +01:00
2013-02-26 14:36:57 +01:00
2013-03-13 22:39:25 +01:00
2013-02-26 10:00:14 +01:00
2013-02-26 14:36:57 +01:00