A reference to another object in a MongoDB database.
Create a DBRef. Use this class in conjunction with DB#dereference.
@param [String] a collection name @param [ObjectId] an object id
@core dbrefs constructor_details
# File lib/bson/types/dbref.rb, line 28 def initialize(namespace, object_id) @namespace = namespace @object_id = object_id end
# File lib/bson/types/dbref.rb, line 37 def to_hash {"$ns" => @namespace, "$id" => @object_id } end
# File lib/bson/types/dbref.rb, line 33 def to_s "ns: #{namespace}, id: #{object_id}" end