Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
11184 Представления

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
7785
0
сент. 19
98
1
июл. 17
4195
3
дек. 23
19804
4
авг. 16
8410