Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
11187 Zobrazení

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
Zrušit

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 Odpovědi Zobrazení Aktivita
3
kvě 20
7786
0
zář 19
98
1
čvc 17
4200
3
pro 23
19809
4
srp 16
8411