#1047: generateModelsFromDb + singularization
-------------------------------------------------------+------------------- -
Reporter: x!sign.dll | Owner: jwage
Type: enhancement | Status: new
Priority: minor | Milestone: 0.11.2
Component: Behaviors | Version: 0.11
Keywords: singular,plural,singularization,inflector |
-------------------------------------------------------+------------------- -
When the models are generated from the database, the singularization also
applies to 2 letter words such as "cs" or "as", which will never have a
plural.[[BR]]
For example:[[BR]]
Tablename: foo_as_bar[[BR]]
generated modelname: FooABar[[BR]]
Patch:[[BR]]
Inflector.php[[BR]]
Line: 135ff.[[BR]]
Old:[[BR]]
{{{
#135: '/s$/i' => '');
}}}
New:[[BR]]
{{{
#135: '/^(.{2,2})$/i' => '\\1',
#136: '/s$/i' => '');
}}}
- xsign
--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1047>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper