XPATH is creating a WRONG SQL for Retrieve

0
See the xpath in a Retreive: ... and    (     ($MendixCID = empty or ($MendixCID != empty and Registration.Registration_Provider_Implant/Registration.Provider/UID = $MendixCID))     or     ($MendixCID = empty or ($MendixCID != empty and Registration.Registration_Provider_Following/Registration.Provider/UID = $MendixCID))   )  ]  ======== Defect in Mendix version 6.8.1 ===== My table has 2 records. Refer to the "or"  in above xpath. If I remove any one of the 2 condition that are separated by "or" then both record satisfy the xpath and both are fetched. But when I retain it as above i.e. 2 conditions separated by "or", then only 1 recorded is fetched. How in the world can a "or" fetch less records??? $MendixCID is empty. I know of ways to change the above xpath and make it work. But my question is why the above simple looking xpath generates wrong SQL. 
asked
2 answers
2

See the release notes of Mx6.10.3 the part about the or statement: https://docs.mendix.com/releasenotes/modeler/modeler-6.10.3

This seems to be a known bug. I think you need to upgrade your model.

Regards,

Ronald

 

answered
0

You can simplify this to,

 

and 
  (
    ($MendixCID = empty or 
     (Registration.Registration_Provider_Implant/Registration.Provider/UID = $MendixCID or
      Registration.Registration_Provider_Following/Registration.Provider/UID = $MendixCID)
  ) 
] 

Neverthelesss every xpath must be executed well.

answered