Created
February 12, 2011 18:38
-
-
Save blar/823969 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function test() { | |
$user = $this->entityManager->getRepository('Blar\\Model\\User')->findOneById(1); | |
var_dump($user->getName()); | |
$article = $this->entityManager->getRepository('Blar\\Model\\News\\Article')->findOneBy(array( | |
'user' => $user | |
)); | |
var_dump($article->getName()); | |
} | |
?> | |
string(4) "Blar" | |
Catchable fatal error: Object of class Blar\Model\User could not be converted to string in /Users/Blar/Sites/blar/vendor/DBAL2/lib/Doctrine/DBAL/Connection.php on line 1027 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment