Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix conversions namespaces in tutorial #43

Merged
merged 1 commit into from

2 participants

Thibault Duplessis Brendan W. McAdams
Thibault Duplessis

No description provided.

Brendan W. McAdams bwmcadams merged commit 7bc736a into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 13, 2011
  1. Thibault Duplessis
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 4 deletions.
  1. +3 −4 tutorial_src/source/tutorial.rst
7 tutorial_src/source/tutorial.rst
View
@@ -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()
Something went wrong with that request. Please try again.