Open iamankush opened 7 years ago
@goldmane Could you please help ?
@iamankush - I was able to reproduce the error and noticed that it was incorrectly parsing the where clause, specifically not allowing the null keyword to be used as an operand. Check PR #123 to see if this resolves your issue
Thanks a lot Awesome Eric ! Your help is really appreciated! we have 3 more issues which we are facing. I will raise the issues and will keep you posted!
@goldmane
Hi @goldmane Eric,
Could you please try the same query in your test class? This fix does not solve my issue.
Exact query which do not parse - SELECT Id, Member_ID_HFc, Name , (SELECT ID FROM Assets WHERE Company_Number_HFc!=null) FROM Account WHERE Id = :objParentRecord.objId
It doesnt seems to be a problem with null , see below query: assertThat(parser).matches("SELECT Id, Member_ID_HF__c, Name , (SELECT ID FROM Assets WHERE Company_Number_HF_c!='0'),Name FROM Account WHERE Id = :objParentRecord.objId");
Could you please help me with this issue?
@kevinTveizaga @dan-canqui @goldmane @paolo @ziur @rodrigouz @alexrv11 @adriangrajeda
@rahulAppirio can you check whether #129 fixes this, or if we can add the code snippet above to a unit test and resolve this? @iamankush you can build the updated version of this plugin which may resolve your issue.
Hi Enforce Team,
Thank you for the amazing product. I need your help with a very specific scenario while parsing the LIMIT in SOQL with subquery when using WHERE clause. e.g. SELECT Id, Member_ID_HFc, Name , (SELECT ID FROM Assets WHERE Company_Number_HFc!=null LIMIT 1) FROM Account WHERE Id = :objParentRecord.objId
It works fine if I add limit 1 but if I remove the limit 1, it breaks the unit test. When I am trying to debug SOQL with SOQL expressions class, i am not able to figure out what is the issue.
Edit1 : the error is showing EOF at the end of parsed query in junit. Not sure why but still analyzing.
Please help with this issue as this one is really urgent for me to fix for a project deliverable. Your help is appreciated. Please let me know in case you need more details.
Regards, Ankush