[Catalyst] strange generated DBIC accessor name

Frazer Irving superfraz at clumsyjedi.com
Wed Mar 10 13:31:05 GMT 2010


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:

http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.05003/lib/DBIx/=
Class/Schema/Loader/Base.pm#inflect_plural

f

On Wed, Mar 10, 2010 at 1:15 PM, <th at 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" =3D> "self.id" },
> );
>
> Other names seems to be predictable:
>
> __PACKAGE__->has_many(
>  "company_addresses",
>  "Jf::Schema::Result::CompanyAddress",
>  { "foreign.role" =3D> "self.id" },
> );
>
>
> I have no "people" pattern in my database. Did I miss something?
>
> The schema has been generated as usual:
>
> script/jf_create.pl model DB DBIC::Schema Jf::Schema create=3Dstatic \
> 'dbi:Pg:dbname=3Djf' tomas
>
> Thanx,
> Tomas
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100310/ac705=
125/attachment.htm


More information about the Catalyst mailing list