Azure / Azure/data-api-builder
🥕[Bug]: `dab update --relationship.fields` does not support compound keys.
- Vorherrschende Sprache
- C#
- Sterne
- 1.5k
- Forks
- 370
- Ø Merge
- 3 T. 22 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
### 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
```text
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
Beitragsleitfaden
Rechercherichtung
Beginnen Sie in src/Cli/ConfigGenerator.cs bei den Zeilen 1595-1607 und vergleichen Sie die Verarbeitung der Beziehungsfelder mit src/Cli/Utils.cs bei den Zeilen 141-157. Führen Sie den bereitgestellten dab update-Befehl mit beiden Feldpaaren aus; abgeschlossen ist dies, wenn zusammengesetzte Quell- und Zielfelder ohne den Formatfehler akzeptiert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- cli
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100