Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
11178 Tampilan

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
Buang

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

Penulis

Looks like it's not possible. Thanks)

Post Terkait Replies Tampilan Aktivitas
3
Mei 20
7778
0
Sep 19
98
1
Jul 17
4185
3
Des 23
19797
4
Agu 16
8404