On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote:
> Is there a reason not to make the default the pluralized base name rather than
> the table name, since we are talking objects of class "prefix.basename"?

The trouble is that the default pluralizer is really dumb. (Partially
by design. I wanted it to be deterministic, unlike
Lingua::EN::Inflect.)  From the convention manager singular_to_plural
docs:

    * If STRING ends in "x", "ss", or "es", then "es" is appended.
    * If STRING ends in "s" then it is returned as-is.
    * Otherwise, "s" is appended.

Passing a table name like "prices" to that method would result in
"priceses" which is not very nice :)  By convention, table names are
plural already, so the default is to just return the table name.

Another possible default would be to try to pluralize the class name
(which is singular by convention), but I'd rather choose the option
that requires no singular/plural transformation at all.

Anyway, my main goal is just to make it sensible and easy to override.
 The auto_manager_base_name(TABLE, CLASS) seems like a good fit for
that.

-John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to