From 88fb3e60e4165df620d3c8ead7111db54d38f8cd Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 12 Aug 2013 18:55:16 +0000 Subject: [PATCH] Clarify doc/id param resolution for MongoCollection/DB::createDBRef() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@331115 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/mongocollection/createdbref.xml | 12 +++++++++--- reference/mongo/mongodb/createdbref.xml | 14 +++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/reference/mongo/mongocollection/createdbref.xml b/reference/mongo/mongocollection/createdbref.xml index ce8f5bc61a..9bbdfe16e2 100644 --- a/reference/mongo/mongocollection/createdbref.xml +++ b/reference/mongo/mongocollection/createdbref.xml @@ -11,7 +11,7 @@ &reftitle.description; public arrayMongoCollection::createDBRef - arraya + mixeddocument_or_id @@ -21,11 +21,13 @@ - a + document_or_id - Object to which to create a reference. + If an array or object is given, its _id field will be + used as the reference ID. If a MongoId or scalar + is given, it will be used as the reference ID. @@ -38,6 +40,10 @@ Returns a database reference array. + + If an array without an _id field was provided as the + document_or_id parameter, &null; will be returned. + diff --git a/reference/mongo/mongodb/createdbref.xml b/reference/mongo/mongodb/createdbref.xml index 3338c560da..57a9704594 100644 --- a/reference/mongo/mongodb/createdbref.xml +++ b/reference/mongo/mongodb/createdbref.xml @@ -12,7 +12,7 @@ public arrayMongoDB::createDBRef stringcollection - mixeda + mixeddocument_or_id This method is a flexible interface for creating database refrences (see @@ -36,13 +36,13 @@ - a + document_or_id - Object or _id to which to create a reference. If an object or - associative array is given, this will create a reference using - the _id field. + If an array or object is given, its _id field will be + used as the reference ID. If a MongoId or scalar + is given, it will be used as the reference ID. @@ -55,6 +55,10 @@ Returns a database reference array. + + If an array without an _id field was provided as the + document_or_id parameter, &null; will be returned. + &reftitle.examples;