[JAVA-1505] Deprecate DBRef.fetch and DBRefBase Created: 17/Oct/14 Updated: 29/Jan/15 Resolved: 17/Oct/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | 2.13.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Epic Link: | 2.13 Deprecations | ||||||||
| Description |
|
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. |
| Comments |
| Comment by Jeffrey Yemin [ 29/Jan/15 ] |
|
2.13.0 has been released. Closing issue. |
| Comment by Githook User [ 17/Oct/14 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Deprecated all methods and constructs in DBRef and DBRefBase that depend on the DB class. Also deprecated DBRefBase. |