cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Commented] (CAY-2130) Stripping common name prefixes on reverse engineering
Date Tue, 01 Nov 2016 18:02:58 GMT


Andrus Adamchik commented on CAY-2130:

"sed syntax" may not be clear to some Java devs, and the need to use a third-party parser
is less than ideal. Actually I think we can make it simpler. Instead of a full sed script,
we might use a simple regex that matches the part that needs to be stripped off:


> Stripping common name prefixes on reverse engineering
> -----------------------------------------------------
>                 Key: CAY-2130
>                 URL:
>             Project: Cayenne
>          Issue Type: Task
>          Components: Non-GUI Tools
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
> Often table namespacing in a database is done by prepending a common prefix to table
names. Would be nice to be able to clean up the names before we make java names for them.
E.g. transform "myt_table1" into "Table1", "XyzTable1" also into "Table1". Looks like what
we need is a sed-like expression. E.g. in maven config form:
> {noformat}
> <tableNameFilter>s/^myt_//i</tableNameFilter>
> {noformat}
> The problem is that Java Pattern can't directly parse such expressions. May need to use
 a third-party library like or similar.

This message was sent by Atlassian JIRA

View raw message