[Catalyst] strange generated DBIC accessor name

2010-03-10 Thread th
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(

Re: [Catalyst] strange generated DBIC accessor name

2010-03-10 Thread Frazer Irving
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:

Re: [Catalyst] strange generated DBIC accessor name

2010-03-10 Thread Denny
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 },

Re: [Catalyst] strange generated DBIC accessor name

2010-03-10 Thread th
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

Re: [Catalyst] strange generated DBIC accessor name

2010-03-10 Thread J. Shirley
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

Re: [Catalyst] strange generated DBIC accessor name

2010-03-10 Thread Ben van Staveren
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