[Catalyst] Tables with both singular and plural names?

Octavian Rasnita orasnita at gmail.com
Thu Feb 25 12:26:12 GMT 2010


(And sorry again for offtopicness, because DBIC mailing list insists 
rejecting my messages as spam.)

I have a database which contains tables with plural and singular table names
(for example a table "page" and another one "pages")

I would like to generate the DBIC Result classes for it, using the latest
version of DBIx::Class::Schema::Loader. It would be nice if I wouldn't need
to use the backward compatibility mode, because I would like to use the
newest style if possible.

The problem is that the new style of table naming imposes limitations in the
database design, because it doesn't accept tables with plural and singular
names, and this way the ORM becomes less flexible.

I have tried to generate the Result classes for that database, but it
created a single Result class for both tables ("page" and "pages"),
including the columns from both of them in it, but of course, I couldn't use
it because it gave an error telling that some columns don't exist in the

I don't know if there is a solution for the moment, but if I want to use the
new style of DBIx::Class::Schema::Loader, does this mean that the databases
which are supported should not contain tables with names which in English
are the plural and singular for the same word?

It looks like since the last main change in DBIx::Class::Schema::Loader some 
database won't be supported if they contain both tables with plural and 
singular for the same word and the users should use a prior version of this 



More information about the Catalyst mailing list