And this always returns me null. This is because condition "‘condition’=>'document.area=“1” is added at the end of select statement to get policy data. Something like:
select * from policy {joins} where document.area = "1"
So, by this query if no policies with document.area = 1 exist, then result is null.
However, the expected result was policy with given id and with empty $policy->document.