Azure / Azure/azure-functions-java-library
TableInput Annotation doesn't Populate PartitionKey & RowKey for TableServiceEntity
- Lingua principale
- Java
- Stelle
- 45
- Fork
- 49
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
If a POJO model inherits from TableServiceEntity, @TableInput annotation does not populate the PartitionKey & RowKey.
This is not a good experience for a few reasons:
- PartitionKey & RowKey in the table were never defined by the user. Microsoft defined them in the table; so Microsoft needs to find a way to give the developer access to them. What if the names were changed by Microsoft at anytime?
- The user might want to use the same POJO model that they use with the TableInput in other parts of the project that could use Table Storage APIs.
The current workaround is to explicitly define getPartitionKey & getRowKey methods with the @StoreAs annotation.
I think the Functions/Functions SDK team can have multiple options for tackling this, each with their own pros & cons:
- Toggling GSON's case insensetivity.
- Adding a layer on top of GSON to specifically target the exact broken scenario, by explicitly setting the partitionKey & rowKey if the object implements TableEntity.
- Working with the storage team to find a better solution?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia tracciando come @TableInput mappa un POJO che eredita da TableServiceEntity e come GSON gestisce PartitionKey e RowKey. Confronta gli approcci di mapping proposti e conferma il comportamento previsto con il modello di archiviazione; il lavoro è completo quando queste chiavi sono disponibili senza aggiungere manualmente metodi @StoreAs.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, java
- Ambito
- backend, cloud, databases
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100