Skip to content

Commit eee130f

Browse files
aki-ksrozza
authored andcommitted
Fix code example: Scala has no .class operation
1 parent 4d63a88 commit eee130f

File tree

1 file changed

+2
-2
lines changed
  • docs/reference/content/reference/crud

1 file changed

+2
-2
lines changed

docs/reference/content/reference/crud/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ An overload of the `getCollection` method allows clients to specify a different
6767
users my wish their own class with the CRUD API directly. Below we use the `BsonDocument` class from the Scala driver directly:
6868

6969
```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])
7272

7373
// insert a document
7474
val document: BsonDocument = new BsonDocument("_id", new BsonInt32(2)).append("x", new BsonInt32(1))

0 commit comments

Comments
 (0)