Azure / Azure/azure-functions-java-library
TableInput Annotation doesn't Populate PartitionKey & RowKey for TableServiceEntity
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 45
- Forks
- 49
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit nachzuverfolgen, wie @TableInput ein von TableServiceEntity erbendes POJO abbildet und wie GSON PartitionKey und RowKey behandelt. Vergleiche die vorgeschlagenen Abbildungsansätze und bestätige das erwartete Verhalten anhand des Speichermodells; abgeschlossen bedeutet, dass diese Schlüssel verfügbar sind, ohne manuell @StoreAs-Methoden hinzuzufügen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- azure, java
- Bereich
- backend, cloud, databases
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100