[Dbix-class] Adding columns 'on the fly'
Matt S Trout
dbix-class at trout.me.uk
Sun Mar 9 19:31:05 GMT 2008
On Tue, Feb 26, 2008 at 08:37:17AM -0500, Dan Richman wrote:
> Is it possible to select columns without actually adding those columns
> to the schema modules?
>
> In other words:
>
> while (my $obj = $rs->next) {
> my $data = $obj->Foo->my_column;
> }
No.
However, if you use select/as attrs on the resultset,
$obj->get_column('extra_column')
will work.
But ... -why- do you want to do this?
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the DBIx-Class
mailing list