title: Deep clone document with embedded associations
body: <p>How would you go about deep cloning a document in MongoDB (mongoid)</p>
  
  <p>I've tried something like this;</p>
  
  <pre><code>original = Car.find(old_id)
  @car = original.clone
  @car._id = BSON::ObjectId.new
  </code></pre>
  
  <p>But I get problems deserialization of the values afterwards.</p>
  
  <p>How can I make a deep clone with all the documents attributes except the _id?</p>
  
  <p>Edit:
  After following Zachary's example I got some problems with a custom serialization class for the duplicated documents.</p>
  
  <pre><code>class OptionHash
    include Mongoid::Fields::Serializable
  
    # Convert the keys from Strings to Symbols
    def deserialize(object)
      object.symbolize_keys!
    end
  
    # Convert values into Booleans
    def serialize(object)
      object.each do |key, value|
      object[key] = Boolean::MAPPINGS[value]
    end
  end
  </code></pre>
  
  <p>Object is nil for duplicated documents.
  Car.find(old_id).attributes indeed doesn't include the field with the custom serialization, why is that and how can I include it?</p>