singularization is performed on all tablenames when generating models
from database.
this brings up the problem, that the model-file is named
"ATableName", when table name is "cs_tablename",
where "cs_" is just a prefix and not thought to be sigularized??
is this desired behaviour? and whats the proper way to deal with
tablename prefixes?? can i define them somehow?
> singularization is performed on all tablenames when generating models
> from database.
> this brings up the problem, that the model-file is named
> "ATableName", when table name is "cs_tablename",
> where "cs_" is just a prefix and not thought to be sigularized??
> is this desired behaviour? and whats the proper way to deal with
> tablename prefixes?? can i define them somehow?
> Patch to inflector.php which, inflects now when more then 2 chars > #135: '/^(.{2,2})$/i' => '\\1', > #136: '/s$/i' => '');
> On 15 Mai, 17:06, Jens-André Koch <knd.v...@gmail.com> wrote: > > hi,
> > singularization is performed on all tablenames when generating models > > from database. > > this brings up the problem, that the model-file is named > > "ATableName", when table name is "cs_tablename", > > where "cs_" is just a prefix and not thought to be sigularized??
> > is this desired behaviour? and whats the proper way to deal with > > tablename prefixes?? can i define them somehow?
Jep this would work.
On the other hand there won't be a singular of a word, with only 2
letters.
For example a tablename called "foo_as_bar" would turn into FooABar,
which changes the meaning of the tablename itself.
The solution André posted should work.
> Jep this would work. > On the other hand there won't be a singular of a word, with only 2 > letters. > For example a tablename called "foo_as_bar" would turn into FooABar, > which changes the meaning of the tablename itself. > The solution André posted should work.