summaryrefslogtreecommitdiff
path: root/GroLUG/lib/GroLUG/M
diff options
context:
space:
mode:
Diffstat (limited to 'GroLUG/lib/GroLUG/M')
-rw-r--r--GroLUG/lib/GroLUG/M/DB.pm27
-rw-r--r--GroLUG/lib/GroLUG/M/DB/Iscritto.pm2
2 files changed, 3 insertions, 26 deletions
diff --git a/GroLUG/lib/GroLUG/M/DB.pm b/GroLUG/lib/GroLUG/M/DB.pm
index 193cb7a..2622de2 100644
--- a/GroLUG/lib/GroLUG/M/DB.pm
+++ b/GroLUG/lib/GroLUG/M/DB.pm
@@ -10,31 +10,8 @@ my @conn_info = (
{ RaiseError => 1, PrintError => 0, ShowErrorStatement => 1, TraceLevel => 0 }
);
-__PACKAGE__->load_classes;
-#DBIx::Class::Schema->compose_connection( __PACKAGE__, @conn_info );
-
-=head1 NAME
-
-GroLUG::M::DB - DBIC Plain Model Component
-
-=head1 SYNOPSIS
-
-See L<GroLUG>
-
-=head1 DESCRIPTION
-
-DBIC Plain Model Component.
-
-=head1 AUTHOR
-
-A clever guy
-
-=head1 LICENSE
-
-This library is free software . You can redistribute it and/or modify
-it under the same terms as perl itself.
-
-=cut
+__PACKAGE__->load_classes();
+__PACKAGE__->compose_connection(__PACKAGE__,@conn_info);
1;
diff --git a/GroLUG/lib/GroLUG/M/DB/Iscritto.pm b/GroLUG/lib/GroLUG/M/DB/Iscritto.pm
index 5ae0d33..686b4b2 100644
--- a/GroLUG/lib/GroLUG/M/DB/Iscritto.pm
+++ b/GroLUG/lib/GroLUG/M/DB/Iscritto.pm
@@ -5,6 +5,6 @@ __PACKAGE__->load_components(qw(PK::Auto::Pg));
__PACKAGE__->table('iscritti');
__PACKAGE__->add_columns(qw(id nome email attivo note));
__PACKAGE__->set_primary_key('id');
-__PACKAGE__->has_many(pagamenti=>'GroLUG::M::DB::Pagamento','iscritto');
+__PACKAGE__->has_many(pagamenti=>'GroLUG::M::DB::Pagamento','iscritto',{order_by => 'data_scadenza desc'});
1;