Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple non-persisted new entities were found through the given association graph #319

Closed
neimad25 opened this issue Jan 30, 2018 · 3 comments
Labels

Comments

@neimad25
Copy link

Hi,
Everything was perfectly working after the installation. But now I encounter a new error : Multiple non-persisted new entities were found through the given association graph.
_* A new entity was found through the relationship 'CSC\MessageBundle\Entity\MessageMetadata#participant' that was not configured to cascade persist operations for entity: webmaster. 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"}).

  • A new entity was found through the relationship 'CSC\MessageBundle\Entity\MessageMetadata#participant' that was not configured to cascade persist operations for entity: qqqq. 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"})._

But webmaster as qqqq where two users from FOSUser already in database. Why do I need to persist them ?
If I set cascade={"persist"} on entity MessageMetadata, I encounter a new error Notice: Undefined index: 0000000007694a2d00000000110be6bb

Could you help me ?

@TheCelavi
Copy link

I have upgraded symfony from 3.4.2 to 3.4.12.

This was broken, as well as isParticipant() method.

Downgrading to 3.4.2 fixed issue, something new is in Symfony, probably within Doctrine bundle, which breaks this... I can not figure out what is different, it is going to be hard to find out.

@hex333ham
Copy link
Collaborator

this issue is over a year old and I'm tidying up this bundle, if it's still happening please re-open the issue

@Muspi
Copy link

Muspi commented Jul 8, 2020

Hi, I got same error on Symfony 4.4 (problem only occurs in prod env, dev env is working), any idea to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants