You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 10, 2026. It is now read-only.
The RestApiHandler's external_id_mapping configuration incorrectly parses single-field unique indexes that contain underscores in their field names, treating them as compound IDs instead.
Current Behavior:
When using external_id_mapping with a single field name containing underscores:
The handler splits 'external_unique_id' by underscores into ['external', 'unique', 'id'] and attempts to find fields with those names, failing when they don't exist as separate fields.
Expected Behavior external_id_mapping should support:
Single-field unique indexes: { MyModel: 'external_unique_id' } where external_unique_id is one field
Compound unique indexes: { MyModel: 'field1_field2' } where field1 and field2 are separate fields
Fixes
I see two possible fixes:
Check if a field exists before splitting
Optionally allow passing in an array of field names
For 1) it is a bit iffy, since this only really fixes the issue for non-compound columns. But since in theory the issue could also affect compound indexes, 2) would be cleaner.