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? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
The table alias "." is included into order even if the field is a composed one.
sample:
For CONCAT(u.lastName, ' ', u.firstName) staff_name
CONCAT(u.lastName, ' ', u.firstName) staff_name
Order looks like this:
ORDER BY .staff_name
So i created fix for ZfTable\Source\DoctrineQueryBuilder:
protected function order() { $column = $this->getParamAdapter()->getColumn(); $order = $this->getParamAdapter()->getOrder(); if (!$column) { return; } $header = $this->getTable()->getHeader($column); $tableAlias = ($header) ? $header->getTableAlias() : 'q'; if (false === strpos($tableAlias, '.')) { if(empty($tableAlias)){ $tableAlias = $column; } else { $tableAlias = $tableAlias.'.'.$column; } } $this->query->orderBy($tableAlias, $order); }
The text was updated successfully, but these errors were encountered:
Can you fork and create a PR so it's eadier to review the changes?
Sorry, something went wrong.
See now.
Can you fork and create a PR so it's eadier to review the changes? — Reply to this email directly or view it on GitHub #78 (comment).
— Reply to this email directly or view it on GitHub #78 (comment).
Cristian Bichis IMAGIS Strada Faiantei nr 13 550098 Sibiu, Romania Phone: 004.0727.757533 Email: office@imagis.ro Web: www.imagis.ro
No branches or pull requests
Hi,
The table alias "." is included into order even if the field is a composed one.
sample:
For
CONCAT(u.lastName, ' ', u.firstName) staff_name
Order looks like this:
ORDER BY .staff_name
So i created fix for ZfTable\Source\DoctrineQueryBuilder:
The text was updated successfully, but these errors were encountered: