[Dbix-class] nullable column and might_have

2014-06-05 Thread Mitchell Elutovich
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:

Re: [Dbix-class] nullable column and might_have

2014-06-05 Thread Hartmaier Alexander
Hi Mitchell, you've mistaken the direction of the relationship. The result class with the xxxid column should have a belongs_to relationship to ForeignClass with { join_type = LEFT } so that rows where the xxxid column is NULL won't be missing from the resultset if you're joining the