[Dbix-class] Delete with join bug

Juan Camacho jc5826 at gmail.com
Sun Jul 15 20:01:34 GMT 2007


On 7/15/07, Ash Berlin <ash_cpan at firemirror.com> wrote:
> Juan Camacho wrote:
> > There seems to be a bug with the following:
> >
> >        $cart->options(
> >            'option_id.group_id' => $group_id,
> >            { join => ['option_id'] }
> >        )->delete;
> >
>
> What error does this give? Or does it just not work?

It doesn't do the join so the SQL statement is invalid:

DBIx::Class::ResultSet::delete(): DBI Exception: DBD::mysql::st
execute failed: Unknown column 'group_id' in 'where clause' [for
Statement "DELETE FROM cart_option WHERE ( ( ( group_id = ? ) AND (
cart_id = ? ) ) )" with ParamValues:
1='4b553e10-732b-4c21-8c0f-bedb95e8d294', 0='T']



More information about the Dbix-class mailing list