blob: ffd86748583150b546c3e614af9980cb5cd1c0fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package FixMyStreet::App::Model::DB;
use base 'Catalyst::Model::DBIC::Schema';
use strict;
use warnings;
use FixMyStreet;
use Moose;
with 'Catalyst::Component::InstancePerContext';
__PACKAGE__->config(
schema_class => 'FixMyStreet::DB::Schema',
connect_info => sub { FixMyStreet::DB->schema->storage->dbh },
);
sub build_per_context_instance {
my ( $self, $c ) = @_;
$self->schema->cache({});
return $self;
}
=head1 NAME
FixMyStreet::App::Model::DB - Catalyst DBIC Schema Model
=head1 DESCRIPTION
L<Catalyst::Model::DBIC::Schema> Model using schema L<FixMyStreet::DB::Schema>
=cut
1;
|