Re: Ticket #30382 force_insert flag is not passed when saving parents on inherited models

2023-05-18 Thread charettes
I left some notes on the PR but I think the crux of the issue here is that you are trying to change the meaning of Model.save(force_insert=True) from force the insert of the current model to force the insert of the model and all its bases. This is a problem not only for QuerySet.create but

Ticket #30382 force_insert flag is not passed when saving parents on inherited models

2023-05-18 Thread Akash Sen
*[*Looking for an alternate approach*]* *Ticket link : *https://code.djangoproject.com/ticket/30382 *Problem : *When saving we pass force_insert=True to prevent the extra UPDATE statement that precedes the INSERT. The force_insert flag is respected on the child table but not on the parent.

Ticket #30382 force_insert flag is not passed when saving parents on inherited models

2023-05-18 Thread Akash Sen
*Ticket link : *https://code.djangoproject.com/ticket/30382 *Problem : *When saving we pass force_insert=True to prevent the extra UPDATE statement that precedes the INSERT. The force_insert flag is respected on the child table but not on the parent. *The main problem : *On our first go this