[Dbix-class] Return column values not objects?
lists at eightdegrees.com.au
Tue Oct 5 03:16:26 GMT 2010
On Tue, Oct 5, 2010 at 12:58 PM, <seasprocket at gmail.com> wrote:
> The docs appear to say that DBIx can return column values (rather than
> objects), but I can't get it to work. Have tried "select" attribute and also
> "columns" attribute. In both cases, it inflates to objects. I have a simple
> (left) join of two tables and want to retrieve all the id's of the "foo"
> $rs = $self->schema->resultset('My:Bar');
> my @foo_ids = $rs->search(
> bar => $bar->id,
> join => 'foo',
> select => [qw/foo.id/],
I think you want the get_column method..
my @foo_ids = $rs->search(
bar => $bar->id,
join => 'foo',
select => [qw/foo.id/],
> Sorry for this newbie question, but just can't get it to work.
> Bikewise: http://www.bikewise.org
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
Ph 07 40556926
Mob 04 12345 534
More information about the DBIx-Class