diff options
author | dakkar <dakkar@luxion> | 2006-02-08 18:52:19 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2006-02-08 18:52:19 +0000 |
commit | b2bf6e98e29ba55c41d134a1e640bdaa560d1152 (patch) | |
tree | 55a89ad794818e490c49b18be8e4b4006cb935a3 /GroLUG/test_manuali/prova_db.pl | |
parent | il test funziona, aggiunta colonna 'attivo' (diff) | |
download | IscrittiGroLUG-b2bf6e98e29ba55c41d134a1e640bdaa560d1152.tar.gz IscrittiGroLUG-b2bf6e98e29ba55c41d134a1e640bdaa560d1152.tar.bz2 IscrittiGroLUG-b2bf6e98e29ba55c41d134a1e640bdaa560d1152.zip |
funge il modello... ca**o
git-svn-id: svn://luxion/repos/IscrittiGroLUG/trunk@170 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 'GroLUG/test_manuali/prova_db.pl')
-rw-r--r-- | GroLUG/test_manuali/prova_db.pl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/GroLUG/test_manuali/prova_db.pl b/GroLUG/test_manuali/prova_db.pl index 0a3849d..ffa0cf8 100644 --- a/GroLUG/test_manuali/prova_db.pl +++ b/GroLUG/test_manuali/prova_db.pl @@ -6,13 +6,13 @@ use DateTime; #use Devel::TraceCalls;trace_calls { Package => [qw(DBIx::Class::Schema DBIx::Class::Storage::DBI)]}; -my $schema=GroLUG::M::DB->connect('dbi:Pg:dbname=iscritti', - 'grolug', - '', - { RaiseError => 1, PrintError => 0, ShowErrorStatement => 1, TraceLevel => 0 }); +# my $schema=GroLUG::M::DB->connect('dbi:Pg:dbname=iscritti', +# 'grolug', +# '', +# { RaiseError => 1, PrintError => 0, ShowErrorStatement => 1, TraceLevel => 0 }); { -my $iscritto=$schema->resultset('Iscritto')->create({ +my $iscritto=GroLUG::M::DB->resultset('Iscritto')->create({ nome => '__tizio', email => 'tizio@qui', }); @@ -31,10 +31,10 @@ $iscritto->add_to_pagamenti({ } -my $iscritto=$schema->resultset('Iscritto')->search({email=>'tizio@qui'})->next();; +my $iscritto=GroLUG::M::DB->resultset('Iscritto')->search({email=>'tizio@qui'})->next();; -my $last_pag=$iscritto->pagamenti({},{order_by => 'data_scadenza desc'})->next(); +my $last_pag=$iscritto->pagamenti()->next(); print 'Prossima scadenza: ',$last_pag->data_scadenza(),"\n"; -$schema->resultset('Pagamento')->delete(); -$schema->resultset('Iscritto')->delete(); +GroLUG::M::DB->resultset('Pagamento')->delete(); +GroLUG::M::DB->resultset('Iscritto')->delete(); |