Skip to content
New issue

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

[2.0.0] [BUG] Phalcon\Mvc\Model\Query in method parse() #10143

Closed
KorsaR-ZN opened this issue Apr 23, 2015 · 2 comments
Closed

[2.0.0] [BUG] Phalcon\Mvc\Model\Query in method parse() #10143

KorsaR-ZN opened this issue Apr 23, 2015 · 2 comments

Comments

@KorsaR-ZN
Copy link
Contributor

Bug only with "distinct",
without "distinct" - no error

$query = $this->modelsManager->createBuilder()
  ->addFrom('ProductForm', 'f')
  ->innerJoin('Product', 'p.form_id=f.id', 'p')
  ->orderBy('f.name_ru')
  ->groupBy('p.form_id');
  ->distinct(true);

 print_r($query->getQuery()->parse());

Error:

Syntax error, unexpected token *, near to ' FROM [ProductForm] AS [f] INNER JOIN [Product] AS [p] ON p.form_id=f.id ) GROUP BY p.form_id ORDER BY f.name_ru (1461)
@KorsaR-ZN
Copy link
Contributor Author

@KorsaR-ZN KorsaR-ZN changed the title [2.0.0] [BUG] Phalcon\Mvc\Model\Query in method getPhql() [2.0.0] [BUG] Phalcon\Mvc\Model\Query in method parse() Apr 23, 2015
@KorsaR-ZN
Copy link
Contributor Author

@dreamsxin Thanks, it's works.
@andresgutierrez Please merge #10217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant