Revision ceef2f6e
Von G. Richardson vor etwa 7 Jahren hinzugefügt
SL/DB/Business.pm | ||
---|---|---|
5 | 5 |
use SL::DB::MetaSetup::Business; |
6 | 6 |
use SL::DB::Manager::Business; |
7 | 7 |
|
8 |
__PACKAGE__->meta->add_relationship( |
|
9 |
customers => { |
|
10 |
type => 'one to many', |
|
11 |
class => 'SL::DB::Customer', |
|
12 |
column_map => { id => 'business_id' }, |
|
13 |
query_args => [ \' id IN ( SELECT id FROM customer ) ' ], |
|
14 |
}, |
|
15 |
vendors => { |
|
16 |
type => 'one to many', |
|
17 |
class => 'SL::DB::Vendor', |
|
18 |
column_map => { id => 'business_id' }, |
|
19 |
query_args => [ \' id IN ( SELECT id FROM vendor ) ' ], |
|
20 |
}, |
|
21 |
); |
|
22 |
|
|
8 | 23 |
__PACKAGE__->meta->initialize; |
9 | 24 |
|
10 | 25 |
sub validate { |
Auch abrufbar als: Unified diff
Business - Rose relationships customers und vendors