Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #43 from ornicar/patch-1

Fix conversions namespaces in tutorial
  • Loading branch information...
commit 7bc736adee6f7ca917f57de2c19d6460f9ba703e 2 parents 9e7ddaa + 2d13a47
@bwmcadams bwmcadams authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 tutorial_src/source/tutorial.rst
View
7 tutorial_src/source/tutorial.rst
@@ -1,5 +1,4 @@
-
*************************
Tutorial: Using Casbah
*************************
@@ -26,17 +25,17 @@ As we mentioned, as soon as you construct a ``MongoConnection`` object, a few ty
As many Scala developers tend to prefer `Joda time <http://joda-time.sourceforge.net/>`_ over JDK Dates, you can also explicitly enable serialization and deserialization of them (w/ full support for the `Scala-Time wrappers <http://github.com/jorgeortiz85/scala-time>`_) by an explicit call::
- import com.mongodb.casbah.conversions.scala._
+ import com.mongodb.casbah.commons.conversions.scala._
RegisterJodaTimeConversionHelpers()
Once these are loaded, Joda Time (and Scala Time wrappers) will be saved to MongoDB as proper BSON Dates, and on retrieval/deserialization all BSON Dates will be returned as Joda ``DateTime`` instead of a JDK Date (aka `java.util.Date`). Because this can cause problems in some instances, you can explicitly unload the Joda Time helpers::
- import com.mongodb.casbah.conversions.scala._
+ import com.mongodb.casbah.commons.conversions.scala._
DeregisterJodaTimeConversionHelpers()
And reload them later as needed. If you find you need to unload the other helpers as well, you can load and unload them just as easily::
- import com.mongodb.casbah.conversions.scala._
+ import com.mongodb.casbah.commons.conversions.scala._
DeregisterConversionHelpers()
RegisterConversionHelpers()
Please sign in to comment.
Something went wrong with that request. Please try again.