[Dbix-class] Subquery question

Nigel Metheringham Nigel.Metheringham at dev.intechnology.co.uk
Thu May 18 11:28:55 CEST 2006


On Wed, 2006-05-17 at 10:47 +1200, Dan Horne wrote:
>  Nigel Metheringham wrote:
> > 
> > Here's an example I have it returns all items in one table (TaskLog) old
> > than $fromdate and not referenced by another (task_last_run)
> > 
> >     my $rs     = $schema->resultset('TaskLog');
> >     my $subsel = '(SELECT tl_id FROM task_last_run)';
> >     my $qry    = $rs->search(
> >         {
> >             tl_timestamp => { '<=',   $fromdate },
> >             tl_id        => { -not_in => \$subsel }
> >         }
> >     );
> > 
> > The magic trick is the reference to a string containing raw SQL - this
> > is documented in the SQL::Abstract documentation.
> > 
> 
> Thanks, Nigel. I couldn't get this to work for me,

Well I was working on that about a month ago, and it worked then...
Today I finally managed to get back to this project, and it completely
fails to work :-)

So I guess there is a regression - from my point of view - between DBIC
0.060001 & 0.060002 (upgrade happened in that window).

I'll see if I can pin down whats happened and why.

	Nigel.
-- 
[ Nigel Metheringham           Nigel.Metheringham at InTechnology.co.uk ]
[ - Comments in this message are my own and not ITO opinion/policy - ]




More information about the Dbix-class mailing list