Hello list,

I've been banging my head against the wall because of an error message I'm getting which I wasn't getting before. I'm now using DBIx::Class 0.08127, whilst before I believe it was 0.08123.

I'm constructing my search with the following data:

    my @search = (
        {   'modscope.name'           => $modscope,
            'me.name'                 => $module,
            'module_versions.version' => $version,
        },
        {
            join       => [qw /modscope module_versions/],
            '+columns' => ['module_versions.remote_location'],
        }
    );

    my $rs = $c->model('DB::Module')->search(@search);
    my $row = $rs->first;
    ...

This generates the correct query for my case. The reason I explicitly tell it to add the module_versions.remote_location column is because the module_versions tables contains a BLOB column that can be big. If the remote_location appears to be empty I'll fetch it in a new call, otherwise it redirects the user to the remote_location (this is a Catalyst application).

In 0.08123 and 0.08124 this works as I intended and described.

In 0.08125 and 0.08127 it doesn't and I'm presented with this error message: "Implicit prefetch (via select/columns) not supported with accessor 'multi'". The moment the database call is being made ($rs->first) the given error message shows up.

My question is, is this a bug in DBIx::Class or am I doing something that wasn't supposed to work from the beginning?

If this behavior is intended could one give me directions on how to refactor my code? I'm also curious as why this change was made if this is indeed the case.


--
Christiaan Kras
http://blog.htbaa.com

_______________________________________________
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/[email protected]

Reply via email to