MorphiaOrg / morphia

MongoDB object-document mapper in Java based on https://github.com/mongodb/mongo-java-driver
Apache License 2.0
1.66k stars 456 forks source link

Mirror the FindIterable and AggregateIterable APIs in the driver #3284

Open evanchooly opened 1 month ago

evanchooly commented 1 month ago

Currently, Morphia has its own FindOptions and AggregationOptions for historical reasons. Given the recent changes to the APIs for querying and aggregation (namely, that they are themselves Iterable) it makes more sense to mirror how the driver sets those options via these two interfaces versus having overloads to take them. Transitioning to this style of API would simplify the API and reduce the surface area involved.