Revision fa1a87de
Von Kivitendo Admin vor mehr als 8 Jahren hinzugefügt
SL/DB/Part.pm | ||
---|---|---|
39 | 39 |
class => 'SL::DB::Translation', |
40 | 40 |
column_map => { id => 'parts_id' }, |
41 | 41 |
}, |
42 |
shop_parts => { |
|
43 |
type => 'one to many', |
|
44 |
class => 'SL::DB::ShopPart', |
|
45 |
column_map => { id => 'part_id' }, |
|
46 |
}, |
|
42 | 47 |
); |
43 | 48 |
|
44 | 49 |
__PACKAGE__->meta->initialize; |
SL/DB/Shop.pm | ||
---|---|---|
9 | 9 |
use SL::DB::Manager::Shop; |
10 | 10 |
use SL::DB::Helper::ActsAsList; |
11 | 11 |
|
12 |
__PACKAGE__->meta->add_relationships( |
|
13 |
shop_parts => { |
|
14 |
type => 'one to many', |
|
15 |
class => 'SL::DB::ShopPart', |
|
16 |
column_map => { id => 'shop_id' }, |
|
17 |
}, |
|
18 |
); |
|
19 |
|
|
12 | 20 |
__PACKAGE__->meta->initialize; |
13 | 21 |
|
14 | 22 |
sub validate { |
Auch abrufbar als: Unified diff
Shop - Rose shop_parts Verknüpfungen von Shop und Part