Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
11200 Visualizzazioni

To gain performance I want to write multiple records at once.

For example, I already filtered list of partner_ids and I want to write different values to different partners.

What should I do?

Pass list of dicts to write function like this?


partner_ids.write([
     {'id': 1, 'email': 'asd@zxc'},
     {'id': 2, 'fax': '13456'},
{'id': 10, 'street': ''},
])
Avatar
Abbandona

Gain performance ... ? Can you explain to me how you can do it in sql with only one request ? ;)

Orm will just translate your 'python' code to sql ...

Autore

Looks like it's not possible. Thanks)

Post correlati Risposte Visualizzazioni Attività
3
mag 20
7788
0
set 19
98
1
lug 17
4206
3
dic 23
19817
4
ago 16
8412