Navigation

MongoDB Scala Drivers

On this page

This is an overview of the available tools for using Scala with MongoDB. Those wishing to skip to more detailed discussion should check out the Mongo Scala Driver Tutorial.

Mongo Scala Driver

The Mongo Scala Driver is the officially supported Scala driver for MongoDB. It’s a modern idiomatic Scala driver with asynchronous and non-blocking IO.

Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the Mongo Scala driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

Scala Driver MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
2.4
2.3  
2.2  

For additional driver versions, see Mongo Scala Driver Compatibility Reference.

The driver does not support older versions of MongoDB.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the Mongo Scala driver for use with a specific version of Scala.

The first column lists the driver version(s).

Scala Driver Scala 2.11 Scala 2.12
2.4
2.3
2.2

For additional driver versions, see Mongo Scala Driver Language Compatibility Reference.

Casbah

Casbah is the legacy Scala driver for MongoDB. It provides wrappers and extensions to the Java driver. meant to allow a more Scala-friendly interface to MongoDB. It supports serialization/deserialization of common Scala types (including collections and regex), Scala collection versions of DBObject and DBList and a fluid query DSL.

Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the Casbah for use with a specific version of MongoDB.

The first column lists the driver version(s).

Casbah MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
3.1 ✓ (partial) ✓ (partial)
3.0    
2.8    
2.7      

Note: The 3.1 driver does not support all MongoDB 3.2 / 3.4 features.

For additional driver versions, see Casbah Compatibility Reference.

The driver does not support older versions of MongoDB.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the Casbah for use with a specific version of Scala.

The first column lists the driver version(s).

Casbah Scala 2.9.3 Scala 2.10 Scala 2.11 Scala 2.12
3.1  
3.0    
2.8  

For additional driver versions, see Casbah Language Compatibility Reference.