Azure / Azure/data-api-builder

🥕[Bug]: `dab update --relationship.fields` does not support compound keys.

Aperta
#2,491 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
1.5k
Fork
370
Merge medio
3g 22h
PR unite (30g)
9

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in src/Cli/ConfigGenerator.cs alle righe 1595-1607 e confronta l’analisi dei campi di relazione con quella in src/Cli/Utils.cs alle righe 141-157. Esegui il comando dab update fornito con entrambe le coppie di campi; il lavoro è completato quando i campi sorgente e destinazione composti vengono accettati senza l’errore di formato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.