return [ map { $_->unblessed } $self->as_list ];
}
+=head3 Koha::Objects->get_column
+
+Return all the values of this set for a given column
+
+=cut
+
+sub get_column {
+ my ($self, $column_name) = @_;
+ return $self->_resultset->get_column( $column_name )->all;
+}
+
=head3 Koha::Objects->TO_JSON
Returns an unblessed representation of objects, suitable for JSON output.
sub AUTOLOAD {
my ( $self, @params ) = @_;
- my @known_methods = qw( count pager update delete result_class single slice get_column );
+ my @known_methods = qw( count pager update delete result_class single slice );
my $method = our $AUTOLOAD;
$method =~ s/.*:://;
plan tests => 1;
my @cities = Koha::Cities->search;
my @city_names = map { $_->city_name } @cities;
- is_deeply( [ Koha::Cities->search->get_column('city_name')->all ], \@city_names, 'Koha::Objects->get_column should be allowed' );
+ is_deeply( [ Koha::Cities->search->get_column('city_name') ], \@city_names, 'Koha::Objects->get_column should be allowed' );
};
subtest 'Exceptions' => sub {