-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: API
-
None
The fact that DBRef needs to be constructed with a DB instance so that the reference can be fetched means that the class can only be used in a context where a DB is available. This is not going to be the case when using the new CRUD API. In addition, the fetch method is limited in that you can't specify, for example, a read preference when fetching. Since fetch is easily implemented in client code by getting the collection name and id from the DBRef and calling findOne, this method will be deprecated.
Also, DBRefBase will be deprecated since DBRef is the only non-deprecated subclass.
- is depended on by
-
JAVA-1506 Remove DBRefBase and DBRef.fetch
- Closed