[Dbix-class] help building query w/ ->search() or using arbitrary select?
Matt S Trout
dbix-class at trout.me.uk
Wed Aug 9 19:47:17 CEST 2006
George Hartzell wrote:
> For future reference, *is* there a way to specify arbitrary sql and
> have it mapped into objects?
>
Not really, but you can hand literal SQL chunks via \$sql (scalarref) to
pretty much any stage of the process. This is far preferable since it
lets you retain at least some of the DBIC metadata.
Of course, nobody's stopping you calling Class->inflate_result(...) just
like ResultSet itself does, but I haven't needed it yet (the worst I've
done is __PACKAGE__->table(\"(SELECT ...)") to get a subselect into the
FROM clause ...)
More information about the Dbix-class
mailing list