Skip to content

Add support for condition variable types when using the Note Listing#9935

Merged
dvesh3 merged 1 commit intopimcore:10.1from
samynw:fix/add-condition-variable-types-on-note-dao
Aug 9, 2021
Merged

Add support for condition variable types when using the Note Listing#9935
dvesh3 merged 1 commit intopimcore:10.1from
samynw:fix/add-condition-variable-types-on-note-dao

Conversation

@samynw
Copy link
Copy Markdown
Contributor

@samynw samynw commented Aug 3, 2021

Changes in this pull request

Previously the Listing class for Notes did not take the condition variable types into account when building the query. This made it impossible to perform some advanced queries on the notes, such as using the IN(?) operator with an array of strings.

Additional info

Example

$notes->setCondition("type IN (?)", [['erp_import', 'workflow]]);

Without the conditionVariableTypes the array of strings is not processed correctly when preparing the query.

The Listing class for Notes did not take the condition variable types
into account when building the query. This made it impossible to perform
some advanced queries on the notes, such as using the IN() operator with
an array of strings.

Use case:
WHERE `type` IN ('erp_import', 'workflow')
@dvesh3 dvesh3 changed the base branch from 10.x to 10.1 August 9, 2021 10:48
@dvesh3 dvesh3 added the Bug label Aug 9, 2021
@dvesh3 dvesh3 added this to the 10.1.1 milestone Aug 9, 2021
@dvesh3 dvesh3 self-assigned this Aug 9, 2021
@dvesh3 dvesh3 merged commit 0a48793 into pimcore:10.1 Aug 9, 2021
@dvesh3
Copy link
Copy Markdown
Contributor

dvesh3 commented Aug 9, 2021

@samynw thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants