[Dbix-class] $rs->count fails with multiple group_by

2008-12-16 Thread Noel Burton-Krahn
ct count(*) from ( ... ) x". I've been digging through the DBIx source to find out where the original SQL gets generated. Any pointers? ~Noel - #! /usr/bin/perl -w =head1 NAME d

Re: [Dbix-class] convention for naming primary keys to avoidambiguousselects

2008-11-25 Thread Noel Burton-Krahn
On Tue, Nov 25, 2008 at 2:06 PM, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > Octavian Rasnita wrote: >> From: "Noel Burton-Krahn" <[EMAIL PROTECTED]> >> >> By the way, does anyone know what happends if a secondary table is named >> "me"

Re: [Dbix-class] convention for naming primary keys to avoid ambiguousselects

2008-11-25 Thread Noel Burton-Krahn
On Tue, Nov 25, 2008 at 10:22 AM, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > Noel Burton-Krahn wrote: >> >> The problem is that DBIx has the "smarts" to prefix column names in >> the select clause, like "select me.id, cds.id" but not in the where &g

Re: [Dbix-class] convention for naming primary keys to avoid ambiguousselects

2008-11-25 Thread Noel Burton-Krahn
On Tue, Nov 25, 2008 at 9:45 AM, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > > As far as the don't repeat yourself - what do you propose? Your query > (the join-ed one) selects from two tables that have the same column. > Unless you specify which column you are interested in, it is not safe > for

Re: [Dbix-class] bug in delete_all: CascadeActions::delete removes parent before children

2008-10-26 Thread Noel Burton-Krahn
On Sun, Oct 26, 2008 at 1:19 AM, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > > 1) You call delete_all > 2) You traverse the entire relationship chain, and start calling delete > on the resulting three backwards, depth first. > 3) By the time you get to the main row that you wanted to delete_all in

Re: [Dbix-class] bug in delete_all: CascadeActions::delete removes parent before children

2008-10-25 Thread Noel Burton-Krahn
the ambiguous select thing fixed because that's bitten me a couple of times before too. Where does the SQL construction happen? ~Noel On Sat, Oct 25, 2008 at 4:16 AM, Jess Robinson <[EMAIL PROTECTED]> wrote: > > > On Fri, 24 Oct 2008, Noel Burton-Krahn wrote: > >

Re: [Dbix-class] bug in delete_all: CascadeActions::delete removes parent before children

2008-10-24 Thread Noel Burton-Krahn
'm not sure how to fix the ambiguous column name error though. Any thoughts? ~Noel On Fri, Oct 24, 2008 at 2:32 PM, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > Noel Burton-Krahn wrote: >> DBIx's cascading delete_all (in DBIx::Class::ResultSet) it broken, >> because

[Dbix-class] bug in delete_all: CascadeActions::delete removes parent before children

2008-10-24 Thread Noel Burton-Krahn
's a fixed version in DBIx-Class-0.08010/lib/DBIx/Class/Relationship/CascadeActions.pm: Regards, Noel Burton-Krahn ### # fixed DBIx/Class/Relationship/CascadeActions.pm in DBIx-Class-0.08010 sub delete { my ($self, @rest) = @_; # delete from tables that dep