Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
11198 มุมมอง

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
7788
0
ก.ย. 19
98
1
ก.ค. 17
4205
3
ธ.ค. 23
19817
4
ส.ค. 16
8411