You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I have 2 json db file. One for user (users.json) and one for transactions (transactions.json)
Everytime i run the java application. The transactions.json file is rewritten and i loose every data in it.
When i add some data in the file, the jsonDBTemplate.collectionExists(Transaction.class) return false so a new transactions.json is written.
The text was updated successfully, but these errors were encountered:
Each JsonDBTemplate corresponding to dbFilesLocationString must be a singleton. Otherwise, when a second thread creates a new JsonDBTemplate(...), calling the lock method will throw an OverlappingFileLockException exception. After the exception occurs, the corresponding data item in collectionsRef will be deleted. Subsequently, when calling collectionExists, it will return false. Ultimately, if we invoke createCollection, it will overwrite the original file, resulting in data deletion.
Hi!
I have 2 json db file. One for user (users.json) and one for transactions (transactions.json)
Everytime i run the java application. The transactions.json file is rewritten and i loose every data in it.
When i add some data in the file, the jsonDBTemplate.collectionExists(Transaction.class) return false so a new transactions.json is written.
The text was updated successfully, but these errors were encountered: