tortoise / tortoise-orm

Familiar asyncio ORM for python, built with relations in mind
https://tortoise.github.io
Apache License 2.0
4.55k stars 374 forks source link

`RE_INSERT_VALUES` doesnt match when calling `Model.bulk_create` #1281

Open NightMarcher opened 1 year ago

NightMarcher commented 1 year ago

Describe the bug

I called Model.bulk_create of tortoise-orm==0.19.2, and found RE_INSERT_VALUES doesn`t match! Here are the screenshots of my finding.

Debug code image

Log image

NightMarcher commented 1 year ago

In addition, aiomysql==0.1.1, batch_size=50, ignore_conflicts=False, update_fields=['gender', 'name', 'locale'], on_conflict=['id'].

When ignore_conflicts=True, matching succeeds. image