You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "George Stan (JIRA)" <ji...@apache.org> on 2010/01/05 14:30:54 UTC

[jira] Created: (CAY-1357) Prefix removal when reverse engineering table and column names.

Prefix removal when reverse engineering table and column names.
---------------------------------------------------------------

                 Key: CAY-1357
                 URL: https://issues.apache.org/jira/browse/CAY-1357
             Project: Cayenne
          Issue Type: New Feature
          Components: CayenneModeler GUI
            Reporter: George Stan


Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.

In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.

Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1357) Allow user changes of NamingStrategy-generated names during reverse engineering

Posted by "George Stan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798483#action_12798483 ] 

George Stan commented on CAY-1357:
----------------------------------

> OK, I see, but originally you suggesed changing column names as well, and this can be too
> much for an overview..
Yes you are right, cause the NamingStrategy you suggested for seems to work for Columns, as I haven't found yet any exceptions that would require user interaction. (Just the table names seem to be tricky right now :) ). (The only issue with columns seems to be https://issues.apache.org/jira/browse/CAY-910 )

Also related to this issue, remains the question how should the user develop, pack and distribute the "Naming Strategy" so that CM recognizes it (especially if the strategy requires other third party libraries as well).

> Allow user changes of NamingStrategy-generated names during reverse engineering
> -------------------------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Modeler
>            Reporter: George Stan
>             Fix For: Undefined future
>
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1357) Prefix removal when reverse engineering table and column names.

Posted by "Andrey Razumovsky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797037#action_12797037 ] 

Andrey Razumovsky commented on CAY-1357:
----------------------------------------

Hi George!

You've not specified version of Cayenne you're using, but Cayenne 3 supports naming strategies for reverse engineering. That is, you can plug your own NamingStrategy implementation. E.g. method NamingStrategy.createObjEntityName(DbEntity entity) allows you to specify obj entity name.

See http://cayenne.apache.org/doc/reverse-engineer-database.html 

> Prefix removal when reverse engineering table and column names.
> ---------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: CayenneModeler GUI
>            Reporter: George Stan
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAY-1357) Allow user changes of NamingStrategy-generated names during reverse engineering

Posted by "Andrey Razumovsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Razumovsky updated CAY-1357:
-----------------------------------

    Summary: Allow user changes of NamingStrategy-generated names during reverse engineering  (was: Prefix removal when reverse engineering table and column names.)

OK, I see, but originally you suggesed changing column names as well, and this can be too much for an overview.. So I think we should stay with ObjEntity names only

> Allow user changes of NamingStrategy-generated names during reverse engineering
> -------------------------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Modeler
>            Reporter: George Stan
>             Fix For: Undefined future
>
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1357) Prefix removal when reverse engineering table and column names.

Posted by "Andrey Razumovsky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798469#action_12798469 ] 

Andrey Razumovsky commented on CAY-1357:
----------------------------------------

I'm not sure I understand what you mean. Surely we can't handle all users' table naming patterns. Also note that '_' is currently used for word separation - e.g. PRODUCT_GROUP table will have a ProductGroup (notice capital G) objEntity. 
If you want to remove all prefixes, you can write your strategy once. How will it become obsolete?

> Prefix removal when reverse engineering table and column names.
> ---------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Modeler
>            Reporter: George Stan
>             Fix For: Undefined future
>
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1357) Prefix removal when reverse engineering table and column names.

Posted by "George Stan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798476#action_12798476 ] 

George Stan commented on CAY-1357:
----------------------------------

> If you want to remove all prefixes, you can write your strategy once. How will it become obsolete? 
Because it can happen that not all tables have this prefix or need it to be removed. If the implemented strategy takes exceptions into account, future updates to the database (new tables, or various db refactrorings) might change the list of tables that don't have this.
(Also e.g. there are many prefixes without underscore '_' , so there the simple regexp could fail even more)

> Prefix removal when reverse engineering table and column names.
> ---------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Modeler
>            Reporter: George Stan
>             Fix For: Undefined future
>
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1357) Prefix removal when reverse engineering table and column names.

Posted by "George Stan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798479#action_12798479 ] 

George Stan commented on CAY-1357:
----------------------------------

> So are you suggesting manual control of every entity name at reverse engineering stage?
Not quite :). The "strategy" does it's best to guess but displays the results so that the user can interact with the exceptions (that will be saved for the next processings). Showing an overview, doesn't mean allot of work to for the user.

> to me seems same as editing names afterwards
Unfortunately it's not the same, as at that point it's too late. Changing a name there, means to change it in allot of places and keep everything consistent - it's just too much work.

The overview table in final step in the reverse engineering looks like the best place for this.
As I said, the "NamingStrategy" is a nice idea, but IMHO it's missing the user interaction and a way to persist that interaction for further reverse engineering trials.

> Prefix removal when reverse engineering table and column names.
> ---------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Modeler
>            Reporter: George Stan
>             Fix For: Undefined future
>
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1357) Prefix removal when reverse engineering table and column names.

Posted by "George Stan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798457#action_12798457 ] 

George Stan commented on CAY-1357:
----------------------------------

Thank you for you comments Ari and Andrey.

> as a workaround you might like to look at running some simple regex against the XML 
> model file to do what you need. 
This seems error prone to me, but the users expect the CM to produce "correct" results :(.
The main selling point of Cayenne would have been CM and the fact that users don't have to deal with the XML or the mapping (only visually in the GUI) (and even the domain experts could than do the mapping) :).


> You've not specified version of Cayenne you're using,
I'm evaluating all of them for  several projects :) (1.2.x but 3 too).

> Cayenne 3 supports naming strategies for reverse engineering. That is, you can plug your own
> NamingStrategy implementation. E.g. method NamingStrategy.createObjEntityName(DbEntity entity)
> allows you to specify obj entity name.
This is nice, and I've read the API, but I see now way how the user might interact with this process, as one can't expect to user to write a new "strategy" code for every mapping it's making, or every time some changes in the DB make the "strategy" obsolete.

In many (edge) cases, only the user can decide if the "modification" does or does not apply to a specific entity, so to be able to do this, I think this issue is related to https://issues.apache.org/jira/browse/CAY-1358 - at least from the GUI workflow point of view - i.e. when the user decides the target datamap (as of CAY-1358), to be able to decide the transformations too (this issue).


> Prefix removal when reverse engineering table and column names.
> ---------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Modeler
>            Reporter: George Stan
>             Fix For: Undefined future
>
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1357) Prefix removal when reverse engineering table and column names.

Posted by "Andrey Razumovsky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798477#action_12798477 ] 

Andrey Razumovsky commented on CAY-1357:
----------------------------------------

So are you suggesting manual control of every entity name at reverse engineering stage? This is not very productive ( to me seems same as editing names afterwards) 

> Prefix removal when reverse engineering table and column names.
> ---------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Modeler
>            Reporter: George Stan
>             Fix For: Undefined future
>
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1357) Prefix removal when reverse engineering table and column names.

Posted by "Ari Maniatis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796939#action_12796939 ] 

Ari Maniatis commented on CAY-1357:
-----------------------------------

I can see the use for your feature request, but as a workaround you might like to look at running some simple regex against the XML model file to do what you need.

> Prefix removal when reverse engineering table and column names.
> ---------------------------------------------------------------
>
>                 Key: CAY-1357
>                 URL: https://issues.apache.org/jira/browse/CAY-1357
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: CayenneModeler GUI
>            Reporter: George Stan
>
> Allow in Cayenne Modeler the possibility to automatically remove prefixes from the table and column names when doing the reverse engineering step.
> In many DBs, the table names have prefixes like 'T_' or 'app_' (where app is the name of the db or application name) or some other project specific conventions.
> Also it's usual for many columns to have the 'C_' prefix or the table name as a prefix in front of every column.
> Those conventions are OK for the DB, but not as Object names, so allot of manual work is required right now. Please allow an automatic way for this: this would increase the productivity allot.
> Thank you.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.