You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2016/11/01 15:58:58 UTC

[jira] [Updated] (CAY-2130) Stripping common name prefixes on reverse engineering

     [ https://issues.apache.org/jira/browse/CAY-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik updated CAY-2130:
---------------------------------
    Description: 
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 https://github.com/tools4j/unix4j or similar.

  was:
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}
<nameFilter>s/^myt_//i</nameFilter>
{noformat}

The problem is that Java Pattern can't directly parse such expressions. May need to use  a third-party library like https://github.com/tools4j/unix4j or similar.


> Stripping common name prefixes on reverse engineering
> -----------------------------------------------------
>
>                 Key: CAY-2130
>                 URL: https://issues.apache.org/jira/browse/CAY-2130
>             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 https://github.com/tools4j/unix4j or similar.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)