<div dir="ltr"><div>I have something like the following on a custom result source</div><div><br></div><div><div>__PACKAGE__->add_columns(</div><div> "xxxid",<br></div><div> { data_type => "INT", default_value => undef, is_nullable => 1, size => 11 },</div>
<div>);</div><div><br></div><div>__PACKAGE__->might_have(</div><div> "xxxd",</div><div> "ForeignClass",</div><div> { "<a href="http://foreign.id">foreign.id</a>" => "self.xxxid" },</div>
<div>);</div><div><br></div></div><div>I'm getting the warning:</div><div><br></div><div>DBIx::Class::Relationship::HasOne::_validate_has_one_condition(): "might_have/has_one" must not be on columns with is_nullable set to true (MyClass/xxxid). This might indicate an incorrect use of those relationship helpers instead of belongs_to. at ... </div>
<div><br></div><div>I don't understand why this for might_have might be incorrect, doesn't might_have imply it might be null?</div></div>