Mercurial > pub > Impl
comparison Lib/IMPL/ORM.pm @ 194:4d0e1962161c
Replaced tabs with spaces
IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author | cin |
---|---|
date | Tue, 10 Apr 2012 20:08:29 +0400 |
parents | d1676be8afcc |
children |
comparison
equal
deleted
inserted
replaced
193:8e8401c0aea4 | 194:4d0e1962161c |
---|---|
48 | 48 |
49 my $ds = IMPL::ORM::Storage::DBIC->new('My::Data',$dsn,$user,$pass,{Autocommit => 1}); | 49 my $ds = IMPL::ORM::Storage::DBIC->new('My::Data',$dsn,$user,$pass,{Autocommit => 1}); |
50 | 50 |
51 | 51 |
52 my $foo = $ds->Insert( | 52 my $foo = $ds->Insert( |
53 My::Data::Foo->new( | 53 My::Data::Foo->new( |
54 'foo class' | 54 'foo class' |
55 ) | 55 ) |
56 ); | 56 ); |
57 | 57 |
58 my $bar = $ds->Insert( | 58 my $bar = $ds->Insert( |
59 My::Data::Bar->new( | 59 My::Data::Bar->new( |
60 'bar class' | 60 'bar class' |
61 ) | 61 ) |
62 ) | 62 ) |
63 | 63 |
64 $bar->fooObject($foo); | 64 $bar->fooObject($foo); |
65 | 65 |
66 $ds->Save($bar); | 66 $ds->Save($bar); |
67 | 67 |
68 my $fooOther = $ds->Retrieve( | 68 my $fooOther = $ds->Retrieve( |
69 'My::Data::Bar', | 69 'My::Data::Bar', |
70 { | 70 { |
71 name => 'bar class', | 71 name => 'bar class', |
72 fooObject => { | 72 fooObject => { |
73 name => 'some foo' | 73 name => 'some foo' |
74 } | 74 } |
75 } | 75 } |
76 ) | 76 ) |
77 | 77 |
78 =end code | 78 =end code |
79 | 79 |
80 =head1 DESCRIPTION | 80 =head1 DESCRIPTION |