(PECL mongo >= 0.9.0)
MongoDBRef::create — ����һ���µ����ݿ�����
This extension that defines this class is deprecated. Instead, the MongoDB extension should be used. There is no equivalent for this class in the new extension.
���ݿ����ã�database reference�� �ĸ�����Ҵ����Ѿ������á�
���û��ָ�����ݿ⣬����ʹ�õ�ǰ���ݿ⡣
collection
�������ƣ����������ݿ�������
id
Ҫ���ӵĶ���� _id �ֶΡ�
database
���ݿ�����
�������á�
Example #1 MongoDBRef::create() ����
�������Ϊ�ĵ�������һ�� addresses �����ݿ����á� MongoCollection::getName() �������ؼ��ϵ����֣����������ݿ�������
<?php
$addresses = $db->addresses;
$people = $db->people;
// ���� $address����������һ�� _id
$addresses->insert($address);
// ��������
$ref = MongoDBRef::create($addresses->getName(), $address['_id']);
//���� $person ����ֶ�
$person['address'] = $ref;
$people->save($person);
?>