Behebt #2139.
__PACKAGE__->meta->add_relationships(
part => {
- type => 'one to one',
+ type => 'many to one',
class => 'SL::DB::Part',
column_map => { parts_id => 'id' },
},
__PACKAGE__->meta->make_manager_class;
__PACKAGE__->meta->add_relationship(
unit_obj => {
- type => 'one to one',
+ type => 'many to one',
class => 'SL::DB::Unit',
column_map => { unit => 'name' },
},
__PACKAGE__->meta->add_relationship(
unit_obj => {
- type => 'one to one',
+ type => 'many to one',
class => 'SL::DB::Unit',
column_map => { unit => 'name' },
},
}
},
periodic_invoices_config => {
- type => 'one to one',
+ type => 'one to many',
class => 'SL::DB::PeriodicInvoicesConfig',
column_map => { id => 'oe_id' },
},
__PACKAGE__->meta->add_relationship(
unit_obj => {
- type => 'one to one',
+ type => 'many to one',
class => 'SL::DB::Unit',
column_map => { unit => 'name' },
},
__PACKAGE__->meta->add_relationships(
invoice => {
- type => 'one to one',
+ type => 'many to one',
class => 'SL::DB::Invoice',
column_map => { ar_id => 'id' },
},
__PACKAGE__->meta->add_relationships(
order => {
- type => 'one to one',
+ type => 'many to one',
class => 'SL::DB::Order',
column_map => { oe_id => 'id' },
},
use SL::DB::MetaSetup::Tax;
-__PACKAGE__->meta->add_relationships(chart => { type => 'one to one',
+__PACKAGE__->meta->add_relationships(chart => { type => 'many to one',
class => 'SL::DB::Chart',
column_map => { chart_id => 'id' },
},
__PACKAGE__->meta->add_relationships(
base => {
- type => 'one to one',
+ type => 'many to one',
class => 'SL::DB::Unit',
column_map => { base_unit => 'name' },
},