milvus/internal
congqixia bc8d4c175c
fix: check allow_insert_auto_id flag in RESTful v2 insert API (#46822)
Related to #46818

When a collection has autoID enabled and `allow_insert_auto_id` property
set to true, the RESTful v2 insert API was incorrectly rejecting
requests that included the primary key field. This fix adds proper
checking of the `allow_insert_auto_id` flag in the `anyToColumns`
function.

Changes:
- Read `allow_insert_auto_id` property from collection schema
- Skip PK field only when autoID is enabled AND allow_insert_auto_id is
false
- Allow PK field in insert request when allow_insert_auto_id is true
- Filter out empty PK column when autoID is enabled and user didn't
provide PK

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2026-01-07 10:13:25 +08:00
..