File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
docs/reference/content/reference/crud Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,8 @@ An overload of the `getCollection` method allows clients to specify a different
67
67
users my wish their own class with the CRUD API directly. Below we use the ` BsonDocument ` class from the Scala driver directly:
68
68
69
69
``` scala
70
- // Pass BsonDocument. class as the second argument
71
- val collection : MongoCollection [BsonDocument ] = database.getCollection(" mycoll" , BsonDocument . class )
70
+ // Pass BsonDocument class as the second argument
71
+ val collection : MongoCollection [BsonDocument ] = database.getCollection(" mycoll" , classOf [ BsonDocument ] )
72
72
73
73
// insert a document
74
74
val document : BsonDocument = new BsonDocument (" _id" , new BsonInt32 (2 )).append(" x" , new BsonInt32 (1 ))
You can’t perform that action at this time.
0 commit comments