3 class Dummy
extends ActiveMongo
7 class Model1
extends ActiveMongo
12 static $validates_presence_of = array(
18 $this->addIndex(array('a' => 1));
23 class Model2
extends ActiveMongo
28 static $validates_presence_of = array(
32 function M1_filter($obj)
34 if (!$obj InstanceOf MongoID
) {
35 throw new ActiveMongo_FilterException("Invalid M1 value");
39 function update_refs($m1)
41 /* reset just in case */
43 $this->where('M1', $m1['_id']);
44 $this->Update(array('a' => $m1['a']));
49 class Model3
extends ActiveMongo
54 static $validates_presence_of = array(