<div dir="ltr"><div>I have something like the following on a custom result source</div><div><br></div><div><div>__PACKAGE__-&gt;add_columns(</div><div>  &quot;xxxid&quot;,<br></div><div>  { data_type =&gt; &quot;INT&quot;, default_value =&gt; undef, is_nullable =&gt; 1, size =&gt; 11 },</div>
<div>);</div><div><br></div><div>__PACKAGE__-&gt;might_have(</div><div>  &quot;xxxd&quot;,</div><div>  &quot;ForeignClass&quot;,</div><div>  { &quot;<a href="http://foreign.id">foreign.id</a>&quot; =&gt; &quot;self.xxxid&quot; },</div>
<div>);</div><div><br></div></div><div>I&#39;m getting the warning:</div><div><br></div><div>DBIx::Class::Relationship::HasOne::_validate_has_one_condition(): &quot;might_have/has_one&quot; 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&#39;t understand why this for might_have might be incorrect, doesn&#39;t might_have imply it might be null?</div></div>