microsoft / spring-data-cosmosdb

Access data with Azure Cosmos DB
MIT License
94 stars 64 forks source link

Return entity collection saved by repository instead of input entity #491

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi, I noticed that the save api of the SimpleDocumentDbRepository return the input entity instead of saved entity. My purpose is to have the updated (or the new) entity with all database fields (such as the last _etag) in order to perform my business logic.

I don't want to execute a read of the entity after the save api 'cause of performance issues. So there is a way to do it, or any plans? Thanks

kushagraThapar commented 4 years ago

Thanks @amanganiello90 for opening this bug, I checked and confirmed this issue.

I will fix it soon. Which version are you using ?

ghost commented 4 years ago

I linked the class of the 2.1.9 version.

kushagraThapar commented 4 years ago

I linked the class of the 2.1.9 version.

kushagraThapar commented 4 years ago

Thanks, closed this by mistake, reopened it. I will fix it. Can't promise the timeline, but will try to do it soon.

kushagraThapar commented 4 years ago

@amanganiello90 let me know if the above fixes look good to you. I plan to release them tonight.

kushagraThapar commented 4 years ago

spring-data-cosmosdb v2.1.10 and v2.2.3 has been released with this fix

ghost commented 4 years ago

spring-data-cosmosdb v2.1.10 and v2.2.3 has been released with this fix

Thanks, I will try it.