Replying to Claude Paroz:
I guess a first experiment would be to make the change and run the test suite to see the outcome.
Thanks, I'll get that done.
Replying to Tim Graham:
WithIndirectChild.objects.create(parent_field=True, direct_child_field=True, indirect_child_field=True)
, I see four queries at 4d48ddd8f93800a80330ec1dee7b7d4afe6ea95a:
1. INSERT INTO "t29568_parent" ("parent_field") VALUES (true) RETURNING "t29568_parent"."id"
2. UPDATE "t29568_directchild" SET "direct_child_field" = true WHERE "t29568_directchild"."parent_ptr_id" = 1
3. INSERT INTO "t29568_directchild" ("parent_ptr_id", "direct_child_field") VALUES (1, true)
4. INSERT INTO "t29568_indirectchild" ("directchild_ptr_id", "indirect_child_field") VALUES (1, true)
Accepting for investigation.
Indeed, I didn't test with IndirectChild.objects.create, but with save() on a IndirectChild not yet saved to DB, since it's done that way by a library (django-tastypie), and outside my control.
I edited the description to reflect that.