[Dbix-class] Oracle, distinct and rows/limit

"Dieter Späth" SHAD0WRUNNER at gmx.de
Fri Apr 27 05:57:36 GMT 2007


-------- Original-Nachricht --------
Datum: Thu, 26 Apr 2007 22:03:32 +0100 (BST)
Von: Jess Robinson <castaway at desert-island.me.uk>
An: dbix-class at lists.rawmode.org
Betreff: Re: [Dbix-class] Oracle, distinct and rows/limit

> 
> 
> 
> On Thu, 26 Apr 2007, SHAD0WRUNNER at gmx.de wrote:
> 
> > Hello,
> >
> > in January there was a discussion about "as"-statementes in group by
> >
> > for instance
> >
> > SELECT * FROM
> > (
> >    SELECT A.*, ROWNUM r FROM
> >    (
> >         SELECT myCol AS col1 FROM table
> >           GROUP BY myCol AS col2
> >    ) A
> >    WHERE ROWNUM < 4
> > ) B
> > WHERE r >=3D 1
> >
> > Is this issue allready fixed?
> >
> > Matt S Trout mentioned a patch for this, where can I find this?
> >
> > Regards
> > Dieter
> >
> 
> 
> No idea if it is, but try looking in DBIx::Class::Storage::DBI::Oracle, or
> at the _RowNumberOver for DB2 in DBIx::Class::Storage::DBI.
> 
> Jess
> 


It seems this Bug still exists. I updatet my DBIx version to 0.07006.

When I try the following:

$rs=$schema->resultset($class)
           ->search(                                                                            
                    undef,
                    {                                                                                                                                        
                     page => 1,                                                                   
                     rows => 10,                                                                                                                                 
                     distinct => 1                                                               
                   }                                                                                                                                       
                  );   

$rs->next;

I got an error :-(

I think it is the same problem like bugreport 25333 "AS is added to GROUP BY when using slice" at cpan descripes.

Regards 
Dieter



-- 
FastJack

"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



More information about the Dbix-class mailing list