Google Groups Home
Help | Sign in
Message from discussion #1047: generateModelsFromDb + singularization
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Doctrine  
View profile
 More options 16 May, 13:43
From: "Doctrine" <no-re...@phpdoctrine.org>
Date: Fri, 16 May 2008 12:43:58 -0000
Local: Fri 16 May 2008 13:43
Subject: [Doctrine] #1047: generateModelsFromDb + singularization
#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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google