Google Groups Home
Help | Sign in
modelfiles naming problem (prefix singularization while generateModelsfromDb)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all
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
Jens-André Koch  
View profile
 More options 15 May, 16:06
From: Jens-André Koch <knd.v...@gmail.com>
Date: Thu, 15 May 2008 08:06:54 -0700 (PDT)
Local: Thurs 15 May 2008 16:06
Subject: modelfiles naming problem (prefix singularization while generateModelsfromDb)
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?

[php]
foreach ($e as $k => $v)
{
  $e[$k] = Doctrine_Inflector::singularize($v);

}

[/php]

best regards, jens


    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.
Jens-André Koch  
View profile
 More options 15 May, 16:23
From: Jens-André Koch <knd.v...@gmail.com>
Date: Thu, 15 May 2008 08:23:35 -0700 (PDT)
Local: Thurs 15 May 2008 16:23
Subject: Re: modelfiles naming problem (prefix singularization while generateModelsfromDb)
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:


    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.
Jonathan Wage  
View profile
 More options 15 May, 19:59
From: "Jonathan Wage" <jonw...@gmail.com>
Date: Thu, 15 May 2008 13:59:09 -0500
Local: Thurs 15 May 2008 19:59
Subject: Re: [doctrine-dev] Re: modelfiles naming problem (prefix singularization while generateModelsfromDb)

I would turn of singularization on import:

Doctrine_Manager::getInstance()->setAttribute('singularize_import', false);

- Jon

On Thu, May 15, 2008 at 10:23 AM, Jens-André Koch <knd.v...@gmail.com>
wrote:

--
Jonathan Wage
http://www.jwage.com
http://www.centresource.com

    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.
x!sign.dll  
View profile
 More options 16 May, 13:03
From: "x!sign.dll" <xsign....@googlemail.com>
Date: Fri, 16 May 2008 05:03:19 -0700 (PDT)
Local: Fri 16 May 2008 13:03
Subject: Re: modelfiles naming problem (prefix singularization while generateModelsfromDb)
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.

- xsign


    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.
Jonathan Wage  
View profile
 More options 16 May, 13:16
From: Jonathan Wage <jonw...@gmail.com>
Date: Fri, 16 May 2008 07:16:00 -0500
Subject: Re: [doctrine-dev] Re: modelfiles naming problem (prefix singularization while generateModelsfromDb)
Can you create a ticket to patch that?

Sent from my iPhone

On May 16, 2008, at 7:03 AM, "x!sign.dll" <xsign....@googlemail.com>  
wrote:


    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.
x!sign.dll  
View profile
 More options 16 May, 13:43
From: "x!sign.dll" <xsign....@googlemail.com>
Date: Fri, 16 May 2008 05:43:17 -0700 (PDT)
Local: Fri 16 May 2008 13:43
Subject: Re: modelfiles naming problem (prefix singularization while generateModelsfromDb)
    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.
End of messages
« Back to Discussions « Newer topic     Older topic »

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