Class: XGen::Mongo::Driver::ObjectID

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo_record/base.rb

Overview

An ObjectID. The primary key for all objects stored into Mongo through Babble, stored in the _id field.

Normally, you don’t have to worry about ObjectIDs. You can treat _id values as strings and XGen::Mongo::Base or Babble will covert them for you.

The ObjectID class constructor and initialize methods are defined in Java.

Instance Method Summary collapse

Instance Method Details

#to_oidObject

Convert this object to an ObjectID.



39
40
41
# File 'lib/mongo_record/base.rb', line 39

def to_oid
  self
end