Note that there are some explanatory texts on larger screens.

plurals
  1. USCalin
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COFirst of all thank you very much for the replies. I have found the problem. After reading http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/advanced-configuration.html#reference-proxies I realize that the problem had to be somewhere else. So I start reviewing my code again and found the inside my entity C class, inside the setEntityA function there was a variable misspelled. Because of that doctrine throw-ed an error which made my ZF skip the code from my action, and because in the postDispach function I had the flush function that is why I got that error message.
      singulars
    2. COThe problem is that $eA is a proxy not an entity. If i do $eA = $repositoryA->find(xx), where xx is a different identifier than the one in the proxy class it will be an entity and the code will work. The problem is that i can not have 2 object for the same record. I have also tried getting $eB by query builder like "SELECT b, a FROM B b JOIN b.entityA a WHERE b.id = 1" but it still gives me a proxy
      singulars
    3. COI did'nt post the error because it will be confusing and irelevant to the problem. Here is the error: "Fatal error: Uncaught exception 'Doctrine\ORM\ORMInvalidArgumentException' with message 'A new entity was found through the relationship 'A#entitiesB' that was not configured to cascade persist operations for entity: . To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).' in \library\Zend\Controller\Plugin\Broker.php on line 336"
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload