[Flow] OneToOne Relation issue

Carsten Bleicker carsten at bleicker.de
Fri Jun 28 16:46:11 CEST 2013


sure, that you dont need a ManyToOne Relation instead of a OneToOne?


Am 28.06.2013 um 16:00 schrieb The Social Nerd:

> Hi there,
> 
> I have declared a OneToOne-Relation between two models A and B with \ORM. Then I updated my database with the command ./flow doctrine:update and everything works fine. Now I implemented the following function:
> 
> /*
> * @param \PG\Sample\Domain\Model\ModelB $modelB
> * @return void
> */
> 
> public function addModelB(ModelB $modelB) {
> 	$modelA = new \PG\Sample\Domain\Model\ModelA(); 	$modelA->setTitle("test");
> 	$modelA->setModelB($modelB);
> 	$this->modelARepository->add($modelA);	
> }
> 
> After I sent a POST-Request with the ModelB-Object, I get the following error:  PHP Fatal error:  Doctrine\\ORM\\Proxy\\ProxyFactory::getProxy(): Failed opening required '/var/www/sample/Data/Temporary/Development/Doctrine/Proxies/__CG__PGSampleDomainModelB.php' But the reference was written correctly into my database so I don't understand what`s wrong with my code.
> 
> Any ideas?
> 
> Best,
> Pascal
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list