Closed fhuonder closed 4 years ago
Hello @fhuonder, thank you for contributing! I've updated the execution_queue-lib as requested https://github.com/marioreggiori/execution_queue/commit/55b8548c78f0cb333664ef79f76e030ac101d944 and merged your pull request https://github.com/marioreggiori/objectdb/pull/41. Tests run without any errors. The new version is available at pub https://pub.dev/packages/objectdb/versions/1.0.10
Hi,
The db behaves wrong when a update-record contains null values. Inserting and updating documents with null-values works because because the default function
json.encode
is used.This leads to the problem, when calling
open()
it always returns the inital version (and not the latest (upated) one). This because onopen()
the database goes through all lines in the db-file and the insert-lines ('+') are decoded byjson.decode
but the update-lines ('~') are decoded by the custom function_decode
and this custom decode-function does not accept null values. In this case anObjectDBException
is thrown and this leads to the line being ignored.In my opinion two things should be done:
_decode
db.find()
always returned an old version.Regards, Florian