[JAVA-3149] GridFS lacks a constructor that receives Database instead of DB Created: 28/Jan/19 Updated: 28/Jan/19 Resolved: 28/Jan/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | GridFS |
| Affects Version/s: | 3.9.1 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Ismaël Mejia | Assignee: | Ross Lawley |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Minor Change |
| Description |
|
GridFS has a constructor that receives a `DB` object, however obtaining a DB object `getDb()`is deprecated now in MongoClient `client.getDB(String name)`. So probably a new constructor or a viable alternative to instantiate GridFS is needed.
|
| Comments |
| Comment by Ross Lawley [ 28/Jan/19 ] |
|
Hi iemejia, Thanks for the ticket. You're correct the legacy GridFS implementation is effectively deprecated due to it using the deprecated DB class. Did you know there is a new GridFS implementation? It follows the GridFS Specification and uses the preferred MongoDatabase class. See the GridFS documentation for more information. Ross |