Azure / Azure/data-api-builder
🥕[Bug]: `dab update --relationship.fields` does not support compound keys.
- Langage dominant
- C#
- Étoiles
- 1.5k
- Forks
- 370
- Merge moyen
- 3 j 22 h
- PR mergées (30 j)
- 9
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez dans src/Cli/ConfigGenerator.cs aux lignes 1595-1607 et comparez son analyse des champs de relation avec src/Cli/Utils.cs aux lignes 141-157. Exécutez la commande dab update fournie avec les deux paires de champs ; c’est terminé lorsque les champs source et cible composés sont acceptés sans l’erreur de format.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp
- Domaine
- cli
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100