mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1039: Error in DQL Example #1298
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Feb 21, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user dalvarez:
At http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html the following example is given:
<?php $query = $em->createQuery('SELECT u from ForumUser u WHERE (u.username = :name OR u.username = :name2) AND u.id = :id'); $query->setParameters(array( ':name' => 'Bob', ':name' => 'Alice', ':id' => 321, )); $users = $query->getResult(); // array of ForumUser objects This can't possibly work, because the second named parameter is called name2, and the PHP array that is passed to the setParameters method has two equal keys, both named ':name'. I guess the second entry in the array should have a key ':name2'.@doctrinebot commented on GitHub (Feb 26, 2011):
Comment created by @beberlei:
Fixed.
@doctrinebot commented on GitHub (Feb 26, 2011):
Issue was closed with resolution "Fixed"