Skip to content
Snippets Groups Projects
Commit 02417290 authored by Ivan Yelizariev's avatar Ivan Yelizariev Committed by Raphael Collet
Browse files

[FIX] core: initialize new stored related field via SQL

Filling the new column in SQL is dramatically faster than doing it via
the ORM, which iterates over all the records in the table.

The test case is creating a related field for 100+ records with distinct
values.  Setting the field's value was taking more than 100 queries.  It
now takes 3 queries.

task-2449313
opw-2380445
opw-2389376
https://github.com/odoo/enterprise/pull/15910



closes odoo/odoo#65232

Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
parent dca2127f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment