- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- description => { type => 'text' },
- factor => { type => 'numeric', precision => 5, scale => 15 },
- sortkey => { type => 'integer' },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ description => { type => 'text' },
+ factor => { type => 'numeric', precision => 5, scale => 15 },
+ sortkey => { type => 'integer' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->relationships(
+ invoice => {
+ class => 'SL::DB::InvoiceItem',
+ column_map => { id => 'price_factor_id' },
+ type => 'one to many',
+ },