Model automatic loading should not work on None values
Currently, the autoloading process in the
VersionedRecord attempt to do a load when encountering a field that matches a table name, even when the value is
NULL in SQL). This fails because the current loading works with a direct equality lookup, and nothing equates to NULL in SQL (per specification).
Additionally, in the case where we perform the proper
IS NULL comparison, there is no certainty that this will yield a single result, even if the index on the foreign key is
Given the above, and the logical implication that a foreign reference NULL seems to imply that there is none, the auto-loading mechanism should not attempt to look up foreign references where the field value is