Nilson Santos Figueiredo Junior wrote:
> On 9/21/06, Nilson Santos Figueiredo Junior <[EMAIL PROTECTED]> wrote:
>> I further dove into the code and I've found exactly where the problem
>> is inside the _collapse_result() method. The following check should
>> fail, however it succeeds:
>>
>> while (
>> !(
>> grep {
>> !defined($tree->[0]->{$_}) || $co_check{$_} ne $tree->[0]->{$_}
>> } @co_key
>> )
>> ) { ... }
>
> No wonder it always succeeds, %co_check is defined as:
>
> my %co_check = map { ($_, $tree->[0]->{$_}); } @co_key;
>
> I think this probably means more than one level deep has_many
> relationships are really broken. In an A has_many B has_many C
> situation, whenever you've got a B that doesn't have any C's, the
> following B rows will magically disappear from your resultset.
>
> I honestly have no clue on how to fix it, hopefully someone else does.
> I think I've already provided the best information I could on this
> issue. This only affects prefetched has_many relationships.
Give me a failing test rather than a mailing list thread and I'll fix it.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/