knplabs/KnpPaginatorBundle — Issue #44: Incorrect Parameters in Pagination Query
Author: whynotmatt
Created: 2011-10-27 20:22:42+00:00
State: open

I recently did a vendor update on my symfony2 project and some of my paginators stopped working. I tracked it down to the pagination query.

The first query is:

SELECT DISTINCT u0_.id AS id0, w1_.id AS id1 FROM widget w1_, user u0_ INNER JOIN user_newspapers u3_ ON u0_.id = u3_.user_id INNER JOIN newspaper n2_ ON n2_.id = u3_.newspaper_id WHERE u0_.id = ? AND w1_.newspaper_id = n2_.id ORDER BY w1_.id ASC LIMIT 20 OFFSET 0
Parameters: [11]

This returns 2 rows:
11,7
11,12

The next query that is run is:

SELECT w0_.id AS id0, w0_.name AS name1, w0_.size AS size2, w0_.theme AS theme3, w0_.created_at AS created_at4, w0_.updated_at AS updated_at5, w0_.analytics AS analytics6, w0_.newspaper_id AS newspaper_id7 FROM widget w0_, user u1_ INNER JOIN user_newspapers u3_ ON u1_.id = u3_.user_id INNER JOIN newspaper n2_ ON n2_.id = u3_.newspaper_id WHERE u1_.id = ? AND w0_.newspaper_id = n2_.id AND w0_.id IN (?, ?) ORDER BY w0_.id ASC
Parameters: [11, '11', '11']

The parameters should be [11,7,12] and that was the querying being run before I updated my vendors directory. I know that my Zend library was updated during the vendors update. Did something change in Zend to break the KnpPaginatorBundle?