The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
package ParentSchema::Result::Foo;

use DBIx::Class::Candy;

table 'Foo';

column id => {
   is_numeric => 1,
};

column bar_id => {
   data_type => 'integer'
};

primary_key 'id';

belongs_to bar =>  'ParentSchema::Result::Bar', 'bar_id';
has_many   bars => 'ParentSchema::Result::Bar', 'foo_id';

1;