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

Show the advice only when relevant. #369

Merged
merged 2 commits into from Jun 18, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/Doctrine/ORM/ORMInvalidArgumentException.php
Expand Up @@ -61,9 +61,11 @@ static public function newEntityFoundThroughRelationship(array $assoc, $entry)
. " configured to cascade persist operations for entity: " . self::objToStr($entry) . "."
. " 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\"}). "
. " If you cannot find out which entity causes the problem"
. " implement '" . $assoc['targetEntity'] . "#__toString()' to get a clue.");
. " this association in the mapping for example @ManyToOne(..,cascade={\"persist\"})."
. (method_exists($entry, '__toString') ?
"":
" If you cannot find out which entity causes the problem"
." implement '" . $assoc['targetEntity'] . "#__toString()' to get a clue."));
}

static public function detachedEntityFoundThroughRelationship(array $assoc, $entry)
Expand Down