When trying to search through a database using ORDA's datastore or entity selection query, make sure to avoid using placeholder syntax when comparing a table field's value to null. The placeholder syntax in the query engine considers null as an unexpected comparison value. An example of what to avoid is given below:
$peopleSelection:=ds.People.query("spouse = :1";Null) // will NOT work and returns empty entity selection
Instead, make sure to be explicit and include the whole null comparison query within the double quotes.
$peopleSelection:=ds.People.query("spouse = null") // correct way to check field for null