Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GORA-649 Replace usage of deprecated API of MongoDB driver #207

Merged
merged 9 commits into from Mar 29, 2020

Conversation

drazzib
Copy link
Member

@drazzib drazzib commented Mar 23, 2020

  • Use new MongoDatabase and MongoCollection API as described on Databases and Collections
  • Use Codec and CodecRegistry interface instead of DefaultDBEncoder
  • MongoFilterUtil: Avoid changing query passed as reference so adapted to return an Optional with subfilter to apply
  • Use org.bson.Document as container everywhere (replace DBObject)
  • Use Filters and Projections helper methods to facilitate the creation of filter documents
  • MongoDBResult: pass cursor and size as constructor args

@drazzib drazzib self-assigned this Mar 23, 2020
This interface, while similar to the existing com.mongodb.MongoClient class
in that it is a factory for com.mongodb.client.MongoDatabase instances,
does not support the legacy com.mongodb.DBCollection-based API :
http://mongodb.github.io/mongo-java-driver/3.12/whats-new/#new-entry-point
Remove fsync handling since its deprecated upstream and should be replaced by proper WriteConcern
@djkevincr
Copy link
Member

+1

@drazzib drazzib merged commit cc62555 into master Mar 29, 2020
@drazzib drazzib deleted the GORA-649-replace-deprecated-mongo-api branch March 29, 2020 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants