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]-Not being able to use the OR operator in the WHERE clause of an object with the flag "master": false #598

Closed
Josecjr opened this issue May 25, 2023 · 5 comments
Assignees
Labels
bug Something isn't working, looks like a bug completed The issue was successfully resolved/Feature is completed

Comments

@Josecjr
Copy link

Josecjr commented May 25, 2023

Describe the bug
If I try to use the OR operator in a query with the Master flag = false I'm getting this error (or similar ones):

FETCHING THE DATA (STAGE 2) ...
[15:21:04.802] PASS 1
...............

[15:21:32.637] [ERROR] Error during execution of the command:
(RecordType.name = 'CRM') OR (account__r.AccountNumber !=
^
ERROR at Row:1:Column:3300
unexpected token: OR.
[15:21:32.641] [ERROR] Execution of the command sfdmu:run has been completed. Exit code 4 (COMMAND_EXECUTION_ERROR).
[15:21:32.644] Total time elapsed: 00h 43m 04s 905ms .

I need to filter the records due to the number of records this table has. The query does not run without a filter.

To Reproduce
Add a master object (Like account)
Add a not master object (like contact)
add a where clause with an OR operator to the not master object (in this example, contact)
Run the plugin

Expected behavior
The query should work

export.json

        "query": "SELECT Id, Name, updateable_true, createable_true FROM Obj WHERE RecordType.name = 'CRM' OR (ObjectA.Account__r.AccountNumber !='' and ObjectA.Account__r.org__c ='xxxx') " 

_target.csv file.
N/A

@Josecjr Josecjr added the bug Something isn't working, looks like a bug label May 25, 2023
@Josecjr Josecjr changed the title [BUG]-Not being able to use the OR operator in the WHERE clause of an objects with "master": false, [BUG]-Not being able to use the OR operator in the WHERE clause of an object with the flag "master": false May 25, 2023
@github-actions
Copy link

This case has been marked as 'to-be-closed', since it has no activity for the 3 days.
It will be automatically closed in another 3 days of inactivity.

@github-actions github-actions bot added the to-be-closed The issue is about to be closed label May 29, 2023
@hknokh hknokh added in-progress Issue is currently in the resolution progress and removed to-be-closed The issue is about to be closed labels May 31, 2023
@hknokh
Copy link
Collaborator

hknokh commented May 31, 2023

Hello,

I wanted to let you know that I am currently still reviewing your case and will inform you as soon as I have any updates. Thank you for your patience and understanding.

Best regards.

hknokh added a commit that referenced this issue Jun 25, 2023
fix: Fixed issue of wrong query constructing #598
@hknokh2
Copy link
Contributor

hknokh2 commented Jun 25, 2023

Hello
Sorry for the long delay.
This issue has been fixed.
Please update the plugin and retry.
Regards.

@hknokh hknokh added completed The issue was successfully resolved/Feature is completed and removed in-progress Issue is currently in the resolution progress labels Jun 25, 2023
@github-actions
Copy link

This case has been marked as 'to-be-closed', since it has no activity for the 3 days.
It will be automatically closed in another 3 days of inactivity.

@github-actions github-actions bot added the to-be-closed The issue is about to be closed label Jun 29, 2023
@github-actions
Copy link

github-actions bot commented Jul 2, 2023

This case has been closed, since it has no activity for the last 6 days. Feel free to reopen it, if you need more help.

@github-actions github-actions bot closed this as completed Jul 2, 2023
@github-actions github-actions bot removed the to-be-closed The issue is about to be closed label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, looks like a bug completed The issue was successfully resolved/Feature is completed
Projects
None yet
Development

No branches or pull requests

3 participants