[Catalyst] prefetch specific columns
Jonathan Rockway
jon at jrock.us
Tue Jul 10 08:18:46 GMT 2007
On Sunday 08 July 2007 08:19:43 am vti wrote:
> Hello.
>
> Is there any way when using 'prefetch' attribute to specify which columns
> to get from db? Or is there any low-level way to change SQL before doing
> any fetches?
Could you give us a bit of information on what you're trying to do? What
Model are you using? DBIC::Schema?
If you're using DBIx::Class, a better place to ask your DBIC questions is on
the DBIx::Class mailing list:
http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
BTW, I have a hunch that you want is:
$rs->search({ ... },
{ join => [qw/relationship_name/],
columns => [qw/foo bar relationship_name.baz .../],
});
--
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part.
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070710/866a0cda/attachment.pgp
More information about the Catalyst
mailing list