Jsondb / jsondb-core

JsonDB a pure java database that stores its data as Json Files

Home Page:http://www.jsondb.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Multiple SchemaUpdates (Rename) not possible

Scorpion1091 opened this issue · comments

In JsonDBTemplate.updateCollectionSchema the JasonWrite function renameKeyInJsonFile is called:
https://github.com/Jsondb/jsondb-core/blob/master/src/main/java/io/jsondb/JsonDBTemplate.java#L402

At this call the collection.values() are passed but not updated.

So if you have multiple renameOperations only the last one takes effect.

The renameKeyInJsonFile-Method should take the PathToCollectionFile instead of the collection.values() and only operate on the JsonFile