public function testTwoDifferentObjectrefs()
{
$refTestObj = new RefTestObj();
$refRefTestObj = new RefRefTestObj();
$refTestObj->id = "/functional/refTestObj";
$refRefTestObj->id = "/functional/refRefTestObj";
$refRefTestObj->name = "referenced";
$refTestObj->reference = $refRefTestObj;
$this->dm->persist($refTestObj);
$this->dm->flush();
$this->dm->clear();
$ins0 = $this->dm->find($this->referencedType, "/functional/refRefTestObj");
$ins0->name = "0 new name";
$ins1 = $this->dm->find($this->referrerType, "/functional/refTestObj");
$ins1->reference->name = "1 new name";
$this->dm->flush();
$this->assertEquals("1 new name", $ins0->name);
$this->assertEquals(spl_object_hash($ins1->reference), spl_object_hash($ins0));
}