Yeah... it doesn't seem like it would be a terribly big deal to
squeeze into 1.2. While having it in preferences makes the most sense
from the UI perspective, I do think its important that it not be
stored in the preferences DB - this way it can be used in the ant
tasks too.
The Wiki could serve as a holding place for pre-canned rules that
people provide, as well...
On 11/20/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
> 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 - 14:08:28 EST