<div dir="ltr"><div>I need some help with this error I'm seeing after upgrading DBIx::Class.</div><div><br></div>In ReulstSet.pm there's this code that calls $storage->_use_multicolumn_in.<div><br></div><div>The problem is that method throws and error on replicated storage.<br><div><br></div><div><br><div><div>sub _rs_update_delete {</div><div><font face="monospace, monospace"> my ($self, $op, $values) = @_;</font></div><div><font face="monospace, monospace"> ....</font></div><div><font face="monospace, monospace"><br></font></div><div><div><font face="monospace, monospace"> if (@$idcols == 1) {</font></div><div><font face="monospace, monospace"> $cond = { $idcols->[0] => { -in => $subrs->as_query } };</font></div><div><font face="monospace, monospace"> }</font></div><div><font face="monospace, monospace"> elsif (<span style="background-color:rgb(255,255,0)">$storage->_use_multicolumn_in</span>) {</font></div><div><font face="monospace, monospace"> # no syntax for calling this properly yet</font></div><div><font face="monospace, monospace"> # !!! EXPERIMENTAL API !!! WILL CHANGE !!!</font></div><div><font face="monospace, monospace"> $cond = $storage->sql_maker->_where_op_multicolumn_in (</font></div><div><font face="monospace, monospace"> $idcols, # how do I convey a list of idents...? can binds reside on lhs?</font></div><div><font face="monospace, monospace"> $subrs->as_query</font></div><div><font face="monospace, monospace"> ),</font></div><div><font face="monospace, monospace"> }</font></div><div><font face="monospace, monospace"> else {</font></div></div><div><br></div><div>But, in DBIx::Class::Storage::Replicated the _use_multicolumn method is blocked by this code:</div><div><br></div><div><div><font face="monospace, monospace">for my $method (@{$method_dispatch->{unimplemented}}) {</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> __PACKAGE__->meta->add_method($method, sub {</font></div><div><font face="monospace, monospace"> my $self = shift;</font></div><div><font face="monospace, monospace"> $self->throw_exception("$method() must not be called on ".(blessed $self).' objects');</font></div><div><font face="monospace, monospace"> });</font></div><div><font face="monospace, monospace">}</font></div></div><div><br></div><div>What I'm not clear on is if this just wasn't tested with Replicated storage, or if there's something odd in my code that is causing ResultSet.pm to call that method (because other deletes are working).</div><div><br></div><div>The query that is failing is:</div><div><br></div><div><div> my $student_class_rs = $account->search_related( 'classes' )->search_related(</div><div> 'student_classes',</div><div> {</div><div> student => $student_id,</div><div> }</div><div> );</div><div><br></div><div> $student_class_rs->delete();</div></div><div><br></div><div>$idcols in the code above is a arrayref of two names 'student' and 'class'.</div><div><br></div>-- <br><div>Bill Moseley<br><a href="mailto:moseley@hank.org" target="_blank">moseley@hank.org</a></div>
</div></div></div></div>