[Dbix-class] Left join on multiple columns
John Goulah
jgoulah at gmail.com
Fri May 18 17:17:10 GMT 2007
On 5/18/07, Ronald J Kimball <rkimball+dbixclass at pangeamedia.com> wrote:
>
> John Goulah wrote:
> > This leads to the question of whether you can write straight SQL in
> > times like these. I suppose it breaks the design, but sometimes its
> > just easier to write SQL... Is it possible?
>
> Yes, you can. That's actually what I have in my code right now. Like so:
>
> my $dbh =3D $schema->storage->dbh;
>
> my $sth =3D $dbh->prepare(<<"EndOfSQL");
> ...
> EndOfSQL
>
> $sth->execute();
So, that does seem to work, and I can even put a method in the Model/myDB.pm
file and call that via $c->model. But what I'd rather do is add these
methods into the table model classes under lib/myDB/*.pm. Is there a way
to access the storage->dbh handle from there?
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070518/715=
4b710/attachment.htm
More information about the Dbix-class
mailing list