diff options
author | Dwight <dmerriman@gmail.com> | 2009-02-09 17:40:45 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-02-09 17:40:45 -0500 |
commit | 192c4e57080d122d4c7b161deb021a103a7e3b29 (patch) | |
tree | 68032a4583786e3994322d32e2bf909dcbdd0a59 | |
parent | a9136628d5dd18cb3219f8bb41163d36c5cd09b5 (diff) | |
download | mongo-192c4e57080d122d4c7b161deb021a103a7e3b29.tar.gz |
comments
-rw-r--r-- | client/model.h | 4 | ||||
-rw-r--r-- | db/jsobj.h | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/client/model.h b/client/model.h index 3b565701ff9..3437d3bdd5e 100644 --- a/client/model.h +++ b/client/model.h @@ -25,11 +25,11 @@ namespace mongo { /** Model is a base class for defining objects which are serializable to the Mongo database via the database driver. - *Definition* + Definition Your serializable class should inherit from Model and implement the abstract methods below. - *Loading* + Loading To load, first construct an (empty) object. Then call load(). Do not load an object more than once. */ diff --git a/db/jsobj.h b/db/jsobj.h index b2edb64a2f2..78ea865559e 100644 --- a/db/jsobj.h +++ b/db/jsobj.h @@ -91,8 +91,12 @@ namespace mongo { */ enum BinDataType { Function=1, ByteArray=2, bdtUUID = 3, MD5Type=5, bdtCustom=128 }; - /** Object id's for BSON objects. - When present they should be the first object member added. + /** Object ID type. + BSON objects typically have an _id field for the object id. This field should be the first + member of the object when present. class OID is a special type that is a 12 byte id which + is likely to be unique to the system. You may also use other types for _id's. + When _id field is missing from a BSON object, on an insert the database may insert one + automatically in certain circumstances. */ class OID { union { |