Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 38729
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: TEEJAY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08010
Fixed in: (no value)



Calling update on a resultset using search with a join will not use the join resulting in invalid sql. example : my $search_criteria = {'ancestor_id' => \q{ = category_id}, 'level' => 1}; my $query_attributes = { join => 'ancestor_join' }; my $rs = $schema->resultset('Category')->search($search_criteria, $query_attributes); $rs->update({ has_children => 1 } ); will give : Unknown column 'ancestor_id' in 'where clause' So the search criteria are used but not the join.
Subject: Re: [rt.cpan.org #38729]
Date: Tue, 26 Aug 2008 22:01:58 +0100
To: Aaron James Trevena via RT <bug-DBIx-Class [...] rt.cpan.org>
From: Matt S Trout <mst [...] shadowcat.co.uk>
On Tue, Aug 26, 2008 at 06:43:34AM -0400, Aaron James Trevena via RT wrote: Show quoted text
> Tue Aug 26 06:43:31 2008: Request 38729 was acted upon. > Transaction: Ticket created by TEEJAY > Queue: DBIx-Class > Subject: (No subject given) > Broken in: 0.08010 > Severity: Normal > Owner: Nobody > Requestors: TEEJAY@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=38729 > > > > Calling update on a resultset using search with a join will not use the > join resulting in invalid sql.
Known bug. Patches and/or tests welcome. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
Changing to stalled in the hope that the original author will submit a set of patches for the described problem.
Now DBIC will warn if such a condition is encountered: http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=5463