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

[BUG]: Phalcon Query Builder cuts fieldname with 'not' in the beginning #15100

Closed
JanEhlbeck83 opened this issue Jul 4, 2020 · 2 comments
Closed
Labels
bug A bug report duplicate Duplicate issue. The duplicate issue is referenced in the comments

Comments

@JanEhlbeck83
Copy link

Describrion:
I tried to use the query builder and when I selected a field named 'notification' e.g.: user.notification I get an error that the field user.ification doesn't exist. The query builder seems to remove the 'not' of 'notification'. It works fine when I double the the word 'not' e.g.: user.notnotification

To Reproduce
The reproduction is easy. Just use the query builder and try to fetch the field 'notification' of any table

`$this->modelsManager->createBuilder()
->columns(['cMI.name', 'cMI.type', 'cMI.uniqueName', 'cMI.notification', 'creatorName' => 'creator.name', 'creatorName' => 'creator.name', 'modifierName' => 'modifier.name'])
->from(['cMI' => 'Common\Models\CompanyMediaImages'])
->leftJoin('Common\Models\Users', 'cMI.createdBy=creator.id', 'creator')
->leftJoin('Common\Models\Users', 'cMI.modifiedBy=modifier.id', 'modifier')
->where('cMI.companyId = :companyId:', ['companyId' => $this->company->id])
->orderBy('cMI.createdAt DESC');
$currentPage = isset($_GET['page']) ? (int)$_GET['page'] : 1;

    $paginator = new QueryBuilder(
    [
        "builder" => $builder,
        "limit"   => $this->itemsPerPage,
        "page"    => $currentPage,
    ]);
    $paginationData = $paginator->paginate();

`
Expected behavior
I expected that the fieldname not got cutted and getting a valid resultset

Details

  • Phalcon version: 4.0.6
  • PHP Version: 7.4.7
  • Operating System: Windows 10
  • Installation type: compiled dll
  • Server: Apache (XAMPP)
@JanEhlbeck83 JanEhlbeck83 added bug A bug report status: unverified Unverified labels Jul 4, 2020
@JanEhlbeck83 JanEhlbeck83 changed the title [BUG]: [BUG]: Phalcon Query Builder cuts fieldname with 'not' in the beginning Jul 4, 2020
@JanEhlbeck83
Copy link
Author

JanEhlbeck83 commented Jul 5, 2020

Sorry for the issue. I saw there are many people faced this problems. [Dublicated Bug Report] Don't wanted to disturb you... Can be closed... I guess

@zsilbi zsilbi removed the status: unverified Unverified label Sep 9, 2020
@zsilbi
Copy link
Member

zsilbi commented Sep 9, 2020

Duplicate issue, see: #14641

@zsilbi zsilbi closed this as completed Sep 9, 2020
@zsilbi zsilbi added the duplicate Duplicate issue. The duplicate issue is referenced in the comments label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report duplicate Duplicate issue. The duplicate issue is referenced in the comments
Projects
None yet
Development

No branches or pull requests

2 participants