Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3250f2ee

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID 3250f2ee17441742890fe97b4fe5851626029441
  • Vorgänger 1f592a0f
  • Nachfolger 442b26e2

Update Pflichtenheftmodels auf DB-Struktur

Unterschiede anzeigen:

SL/DB/MetaSetup/RequirementSpecDependency.pm
15 15
  ],
16 16

  
17 17
  primary_key_columns => [ 'depending_item_id', 'depended_item_id' ],
18

  
19
  foreign_keys => [
20
    depended_item => {
21
      class       => 'SL::DB::RequirementSpecItem',
22
      key_columns => { depended_item_id => 'id' },
23
    },
24

  
25
    depending_item => {
26
      class       => 'SL::DB::RequirementSpecItem',
27
      key_columns => { depending_item_id => 'id' },
28
    },
29
  ],
18 30
);
19 31

  
20 32
1;
SL/DB/MetaSetup/RequirementSpecItem.pm
47 47
      class       => 'SL::DB::RequirementSpecItem',
48 48
      key_columns => { parent_id => 'id' },
49 49
    },
50
  ],
51 50

  
52
  relationships => [
53
    depended_items => {
54
      map_class => 'SL::DB::RequirementSpecDependency',
55
      map_from  => 'depending_item',
56
      map_to    => 'depended_item',
57
      type      => 'many to many',
51
    requirement_spec => {
52
      class       => 'SL::DB::RequirementSpec',
53
      key_columns => { requirement_spec_id => 'id' },
58 54
    },
59 55

  
60
    depending_items => {
61
      map_class => 'SL::DB::RequirementSpecDependency',
62
      map_from  => 'depended_item',
63
      map_to    => 'depending_item',
64
      type      => 'many to many',
56
    risk => {
57
      class       => 'SL::DB::RequirementSpecRisk',
58
      key_columns => { risk_id => 'id' },
65 59
    },
66 60
  ],
67 61
);
SL/DB/RequirementSpecItem.pm
7 7
use SL::DB::Helper::ActsAsList;
8 8

  
9 9
__PACKAGE__->meta->add_relationship(
10
  children       => {
11
    type         => 'one to many',
12
    class        => 'SL::DB::RequirementSpecItem',
13
    column_map   => { id => 'parent_id' },
10
  children     => {
11
    type       => 'one to many',
12
    class      => 'SL::DB::RequirementSpecItem',
13
    column_map => { id => 'parent_id' },
14
  },
15
  dependencies => {
16
    map_class  => 'SL::DB::RequirementSpecDependency',
17
    map_from   => 'depending_item',
18
    map_to     => 'depended_item',
19
    type       => 'many to many',
20
  },
21
  dependents   => {
22
    map_class  => 'SL::DB::RequirementSpecDependency',
23
    map_from   => 'depended_item',
24
    map_to     => 'depending_item',
25
    type       => 'many to many',
14 26
  },
15 27
);
16 28

  

Auch abrufbar als: Unified diff