lib/lotus/model/adapters/mongodb/collection.rb
# Serialize the given entity before to persist in the database.
#
# @return [Hash] the serialized entity
#
# @api private
# @since 0.1.0
Serialize the given entity before to persist in the database.
Serialize the given entity before to persist in the database .
def _serialize(entity)
            serialized = @mapped_collection.serialize(entity)
            serialized.delete(:id)
            serialized[:_id] = Collection.to_mongodb_id(entity.id) unless entity.id.nil?
            serialized
          end
def _serialize ( entity ) serialized = @mapped_collection . serialize ( entity ) serialized . delete ( :id ) serialized [ :_id ] = Collection . to_mongodb_id ( entity . id ) unless entity . id . nil? serialized end
Serialize the given entity before to persist in the database.
Serialize the given entity before to persist in the database .
the serialized entity
the serialized entity
Hash
entity
api
None
since
None