On Tue, Jul 10, 2012 at 7:59 PM, fREW Schmidt <fri...@gmail.com> wrote:

>     * Fixes
>         - Fix complex has_many prefetch with resultsets not selecting
> identity
>           columns from the root result source
>

I'm wondering if this is related to a problem I'm seeing in this version
where a column listed in _inflated_column is undefined.


I've upgraded to SQL::Abstract 1.73 for both versions of DBIC below.

In 0.08196 I don't see the problem (I can't upgraded to .08197).

In 0.08198 what happens is I end up with a row with an _inflated_column
with the column undef.
In  0.08196 _inflated_column is a row object.

For example, if I'm modeling school work -- if a class has many
assignments, and an assignment has many papers, then:


my $paper = $schema->resultset( 'Paper' )->search(
    { 'me.id' => $id },
    {
        prefetch => [
            { assignment => 'class' },
        ],
    }
)->first;

my $assignment = $paper->assignment;
warn Dumper $assignment->{_inflated_column};

print $assignment->class->id;


# in .08198 $assignment->{_inflated_column}{class} is undefined
# in .08196 $assignment->{_inflated_column}{class} is a class row object.


Which results in:

$VAR1 = {
          'class' => undef
        };
Can't call method "id" on an undefined value ....


If I revert to 96 then "class" references a ::Result::Class object.


Is this a know issue?



-- 
Bill Moseley
mose...@hank.org
_______________________________________________
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