Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
11216 Vizualizări

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': ''},
])
Imagine profil
Abandonează

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 ...

Autor

Looks like it's not possible. Thanks)

Related Posts Răspunsuri Vizualizări Activitate
3
mai 20
7790
0
sept. 19
98
1
iul. 17
4208
3
dec. 23
19822
4
aug. 16
8422