Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
11220 Переглядів

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': ''},
])
Аватар
Відмінити

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

Автор

Looks like it's not possible. Thanks)

Related Posts Відповіді Переглядів Дія
3
трав. 20
7793
0
вер. 19
98
1
лип. 17
4211
3
груд. 23
19831
4
серп. 16
8423