I have something like the following on a custom result source

__PACKAGE__->add_columns(
  "xxxid",
  { data_type => "INT", default_value => undef, is_nullable => 1, size =>
11 },
);

__PACKAGE__->might_have(
  "xxxd",
  "ForeignClass",
  { "foreign.id" => "self.xxxid" },
);

I'm getting the warning:

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 ...

I don't understand why this for might_have might be incorrect, doesn't
might_have imply it might be null?
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to