aws / aws/aws-sdk-java-v2

Persist-only property support for DynamoDB Enhanced client

Aperta
#3,913 1 commento 1 reazione 0 assegnatari Vedi su GitHub
dynamodb-enhanced feature-request p3
Lingua principale
Java
Stelle
2.6k
Fork
1k
Merge medio
2g 9h
PR unite (30g)
51

Descrizione

### Describe the feature

The Enhanced client should identify JavaBeans properties based on getter methods. When a setter method is not present, the client should persist the property into DynamoDB but should not attempt to set the property on read. (If necessary, an explicit directive to do this such as Jackson's `@JsonProperty(access)` would be okay.)

### Use Case

I have a table with a large number of derived properties for indexing. Currently, [the Enhanced client fails to correctly identify properties that have only getter methods and not setter methods](https://davidagood.com/dynamodb-enhanced-client-java-missing-setters/). As the use of derived properties to paste together main properties is the standard method of creating indexes for DDB, it would be helpful not to have to include dummy setters.

### Proposed Solution

Modify `BeanTableSchema#isMappableProperty` not to exclude properties without setters, and allow missing setters to be interpreted as "no-op".

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS Java SDK version used

2.19.25

### JDK version used

openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

### Operating System and version

Gentoo Linux

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo BeanTableSchema#isMappableProperty per capire come vengono attualmente escluse le proprietà JavaBeans senza setter. Segui il modo in cui l'Enhanced client gestisce la lettura e la scrittura di tali proprietà, quindi verifica che le proprietà con il solo getter vengano persistite, mentre le letture trattino i relativi setter mancanti come no-op.

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

Valutazione

Stack tecnologico
java
Ambito
databases
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.