We should better use the published method than a private hash key.
And shorter to go via _result than adding a new schema call.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
sub store {
my ($self) = @_;
- my $columns_info = Koha::Database->new->schema->resultset( $self->_type )
- ->result_source->{_columns};
+ my $columns_info = $self->_result->result_source->columns_info;
# Handle not null and default values for integers and dates
foreach my $col ( keys %{$columns_info} ) {