Hello catal[yi]sters,
I'm going to be crazzy about one generated accessor name:
__PACKAGE__-has_many(
company_people, # I expected to be company_persons
Jf::Schema::Result::CompanyPerson,
{ foreign.role = self.id },
);
Other names seems to be predictable:
__PACKAGE__-has_many(
The plural forms of autogenerated relationships are handle by
Lingua::EN::Inflect (I think), and that module will give the plural of
'person' as 'people'
Overriding the defaults is documented here:
On Wed, 2010-03-10 at 14:15 +0100, t...@dix.cz wrote:
Hello catal[yi]sters,
I'm going to be crazzy about one generated accessor name:
__PACKAGE__-has_many(
company_people, # I expected to be company_persons
Jf::Schema::Result::CompanyPerson,
{ foreign.role = self.id },
I'm going to be crazzy about one generated accessor name:
__PACKAGE__-has_many(
company_people, # I expected to be company_persons
Jf::Schema::Result::CompanyPerson,
{ foreign.role = self.id },
);
I have no people pattern in my database. Did I miss something?
People is the
On Wed, Mar 10, 2010 at 7:29 AM, t...@dix.cz wrote:
I'm going to be crazzy about one generated accessor name:
__PACKAGE__-has_many(
company_people, # I expected to be company_persons
Jf::Schema::Result::CompanyPerson,
{ foreign.role = self.id },
);
I have no people pattern
DBIx::Class tends to pluralize relationships, so if you have a one to
many relationship with a table company_person, it will name it
company_people. Generally speaking this is also predictable :)
t...@dix.cz wrote:
Hello catal[yi]sters,
I'm going to be crazzy about one generated accessor