json-flatfile-datastore icon indicating copy to clipboard operation
json-flatfile-datastore copied to clipboard

GetNextIdValue should return next id based on the largest id in the collection, not based on the last item's id

Open ttu opened this issue 7 years ago • 5 comments

GetNextIdValue checks only the last item from the collection and gives a new id based on that item's id. Method should find the item with the largest id value from the collection and give a new id based on that item's id.

Function is in JsonFlatFileDataStore/DocumentCollection.cs Tests are in JsonFlatFileDataStore.Test/CollectionTests.cs

ttu avatar Oct 18 '17 19:10 ttu

I would like to take this item. Can I ?

loneshark99 avatar Feb 09 '18 07:02 loneshark99

@loneshark99 sure! If you have some questions, just ask. I will add in progress label, but there is no hurry to complete this task.

ttu avatar Feb 09 '18 14:02 ttu

@loneshark99 Hi. Do you have any questions regarding this task or if you are not anymore interested in implementing this, just tell me and I will remove "In Progress" label.

ttu avatar May 08 '18 16:05 ttu

Hi. I stumbled upon this issue and tried to solved it. Can you look on last commit on my fork if it looks okay? Or should I make PR?

I must admit that it is probably not the most eficient solution, but i couldn't come up with better one

qpooqp avatar Jun 14 '18 18:06 qpooqp

Thanks! Just make the PR and we can then think together if there is some more efficient way.

ttu avatar Jun 18 '18 08:06 ttu