Fixed #23646 -- Added QuerySet.bulk_update() to update many models efficiently. #9606
I've added tests for updating more complex Postgres fields, but I'm not sure how to write tests for the GIS features. It seems the
charettes left a comment •
Out of curiosity.
Did we explore using the
UPDATE foo SET foo.a = foo_update.a foo.b = foo_update.b FROM VALUES( ('123', 1, '---'), ('345', 2, '+++') ) AS updates(id, a, b) WHERE foo.id IN (...) AND foo.id = foo_update.id -- the IN filtering makes a big difference.
This by no mean a blocker as I'm not sure if it's supported on SQLite and Oracle but it might be great to investigate if adapting
Thanks for pushing this forward by the way.