data-api-builder
data-api-builder copied to clipboard
🥕[Bug]: `dab update --relationship.fields` does not support compound keys.
What happened?
When using dab update with --relationship.fields you cannot pass multiple keys.
Input
dab update Fake --config "c:\Temp\delme-demo-jerry\dab-config-copy.json" --relationship Series_Character --target.entity Series_Character --cardinality one --relationship.fields "SeriesId:SeriesId,CharacterId:CharacterId"
Output
C:\Temp\delme-demo-jerry>dab update Fake --config "c:\Temp\delme-demo-jerry\dab-config-copy.json" --relationship Series_Character --target.entity Series_Character --cardinality one --relationship.fields "SeriesId:SeriesId,CharacterId:CharacterId"
Information: Microsoft.DataApiBuilder 1.2.11
Information: User provided config file: c:\Temp\delme-demo-jerry\dab-config-copy.json
Loading config file from c:\Temp\delme-demo-jerry\dab-config-copy.json.
Error: Please provide the --relationship.fields in the correct format using ':' between source and target fields.
Error: Failed to update the Entity: Fake.
Error: Could not update the entity: Fake.
The Problem (relationship fields)
https://github.com/Azure/data-api-builder/blob/main/src/Cli/ConfigGenerator.cs#L1595-L1607
Compared To (mapping option)
https://github.com/Azure/data-api-builder/blob/main/src/Cli/Utils.cs#L141-L157
Code of Conduct
- [x] I agree to follow this project's Code of Conduct