mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-749: positional query parameters throwing a QueryException #922
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 (Aug 17, 2010).
Jira issue originally created by user goriol:
I get the following exception:
"Invalid parameter number: number of bound variables does not match number of tokens"
when executing the following Doctrine query:
@doctrinebot commented on GitHub (Sep 12, 2010):
Comment created by @beberlei:
I cannot reproduce this sorry, can you retry with Beta4?
@doctrinebot commented on GitHub (Sep 14, 2010):
Comment created by goriol:
Hi Benjamin,
I made a new test and got the same error with BETA4.
Here is the stack trace:
Invalid parameter number: number of bound variables does not match number of tokens
#0 /Users/goriol/src/Doctrine/doctrine-orm-2.0.0BETA4/Doctrine/ORM/Query.php(229): Doctrine\ORM\Query\QueryException::invalidParameterNumber()
#1 /Users/goriol/src/Doctrine/doctrine-orm-2.0.0BETA4/Doctrine/ORM/AbstractQuery.php(528): Doctrine\ORM\Query->_doExecute()
#2 /Users/goriol/src/Doctrine/doctrine-orm-2.0.0BETA4/Doctrine/ORM/AbstractQuery.php(408): Doctrine\ORM\AbstractQuery->execute(Array, 4)
#3 /Users/goriol/src/Doctrine/doctrine-orm-2.0.0BETA4/Doctrine/ORM/AbstractQuery.php(434): Doctrine\ORM\AbstractQuery->getSingleResult(4)
#4 /Users/goriol/src/DoctrineExtensions/lib/DoctrineExtensions/Paginate/PaginationAdapter.php(82): Doctrine\ORM\AbstractQuery->getSingleScalarResult()
#5 /Users/goriol/src/DoctrineExtensions/lib/DoctrineExtensions/Paginate/PaginationAdapter.php(134): DoctrineExtensions\Paginate\PaginationAdapter->setRowCount(Object(Doctrine\ORM\Query))
#6 /Users/goriol/src/Zend/ZendFramework-1.10.5/library/Zend/Paginator.php(1028): DoctrineExtensions\Paginate\PaginationAdapter->count()
#7 /Users/goriol/src/Zend/ZendFramework-1.10.5/library/Zend/Paginator.php(712): Zend_Paginator->_calculatePageCount()
#8 /Users/goriol/src/Technema/Service/Doctrine.php(285): Zend_Paginator->setItemCountPerPage(30)
#9 /Users/goriol/src/Technema/Controller/Rest.php(85): Technema_Service_Doctrine->fetchPage(Array)
#10 /Users/goriol/src/Zend/ZendFramework-1.10.5/library/Zend/Controller/Action.php(513): Technema_Controller_Rest->indexAction()
#11 /Users/goriol/src/Zend/ZendFramework-1.10.5/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('indexAction')
#12 /Users/goriol/src/Zend/ZendFramework-1.10.5/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#13 /Users/goriol/src/Zend/ZendFramework-1.10.5/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#14 /Users/goriol/src/Zend/ZendFramework-1.10.5/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#15 /private/var/www/erp.alterimago.com/public/index.php(24): Zend_Application->run()
#16 {main}
@doctrinebot commented on GitHub (Sep 14, 2010):
Comment created by @beberlei:
That stack trace puts the report in a new light, your code example is not really the source of the error but the pagination adapter is.
@doctrinebot commented on GitHub (Sep 14, 2010):
Comment created by @beberlei:
This is a Doctrine Extensions paginator bug, closing the issue here, its known in the extension already.
@doctrinebot commented on GitHub (Sep 14, 2010):
Issue was closed with resolution "Invalid"
@doctrinebot commented on GitHub (Sep 14, 2010):
Comment created by goriol:
Are you talking about this issue?
http://github.com/beberlei/DoctrineExtensions/issues#issue/10
@doctrinebot commented on GitHub (Sep 15, 2010):
Comment created by @beberlei:
yes thats the one