This is not the answer, but it's only a note:
defining relations for a Nullable column can make a problems
since you are making a relation in table 1, and you are linking it in a row in table 2, that mean you are sure that the data is not null.
and if you are trying to fetch a row, then checking the value of a column if it's null or not, in this time there is no benefit from the relation, because yo are not fetching all data in one call / line.
finally: relation and nullable are not OK together, i hope that this can help you