Re: Modeler - Names at singular after reverse engineering?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Nov 20 2005 - 13:08:01 EST

  • Next message: Cris Daniluk: "Re: Modeler - Names at singular after reverse engineering?"

    Cris,

    I think you may be on to something. We can create a new panel in
    Preferences where users would enter regular expression rules. Each
    rule in a chain can be applied before or after basic conversion of
    "ABC_XYZ" to "abcXyz" done by Cayenne.

    E.g. Ahmed's example may look like this:

    Search: ([^s])s$
    Replace: $1
    After Conversion: Yes

    Stripping a "DB_" prefix from table name would look like this:

    Search: ^DB_
    Replace:
    After Conversion: No

    This is the most flexible solution I can think of... and a pretty
    straightforward too.

    Andrus

    On Nov 20, 2005, at 8:35 PM, Cris Daniluk wrote:
    > You know... I don't know that this is necessarily as difficult as we
    > are making it out to be. It seems like it shouldn't be a blind "remove
    > the s" type system, but rather a mapping file. A simple XML mapping
    > file could send Products to Product, etc, and grow with time.
    >
    > Users could then select whether or not to use it when generating via
    > the modeler or the ant task and even specify their own alternate file.
    > I've long wanted a similar feature - to be able to systematically
    > remove field prefixes/suffixes.
    >
    > Cris



    This archive was generated by hypermail 2.0.0 : Sun Nov 20 2005 - 13:08:04 EST