We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
My query builder looks like this:
$queryBuilder = new QueryBuilder($db); $queryBuilder ->select('i.*', 'u.name', '(SELECT count(v.id) FROM my_vote v WHERE v.image_id = i.id) AS votes') ->from('my_image', 'i') ->leftJoin('i', 'my_user', 'u', 'i.user_id = u.id') ;
I want to order by the number of votes so I add
$queryBuilder->orderBy('votes', 'DESC');
With a statement object and fetchAll this works fine, but when given to pagerfanta, the column is not found and a PDO exception is thrown
Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'votes' in 'order clause''
The text was updated successfully, but these errors were encountered:
Please give the stack trace of the exception so that we know where this exception happens
Sorry, something went wrong.
This appears to be a bug in Doctrine, not Pagerfanta.
doctrine/orm#4510
Ran into this issue today - does any of you know a fix/workaround to this?
No branches or pull requests
My query builder looks like this:
I want to order by the number of votes so I add
With a statement object and fetchAll this works fine, but when given to pagerfanta, the column is not found and a PDO exception is thrown
The text was updated successfully, but these errors were encountered: