r5 icon indicating copy to clipboard operation
r5 copied to clipboard

Update MongoDB driver (match with MongoJack and Jackson)

Open trevorgerhardt opened this issue 2 years ago • 2 comments

MongoDB currently provides documentation for versions v4.3 to v4.8. When making changes, its useful to have available documentation for the driver we are using.

trevorgerhardt avatar Jan 26 '23 17:01 trevorgerhardt

This update must be done when the Persistence.java class is removed.

trevorgerhardt avatar Jan 27 '23 06:01 trevorgerhardt

I just rebased this to see how it fit with current dev, and noticed that the most recent MongoJack has a transitive dependency on 4.8.1 instead of 4.8.2, so aligned all the transitive dependencies. There seem to be some build problems though.

Looking at compilation output I realize the newer MongoDB drivers use a completely different syntax, so things like DBCursor and QueryBuilder are no longer available. Much of the database interaction would need to be rewritten and re-tested.

Originally the PR left the MongoJack version unchanged, but that would have left us with the direct mongodb-driver-sync dependency at v4.8.2 while MongoJack had a transitive dependency on a 3.x series mongodb-driver using the legacy 3.x series APIs.

Maybe the intent was to remove MongoJack along with this PR (as MongoJack might only be used in Persistence and MongoMap). I guess that leads us to a PR like #837 which would fully eliminate use of MongoJack and shift to the newer MongoDB driver API.

abyrd avatar Nov 09 '23 10:11 abyrd