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 2011/08/29 23:51:38 UTC

[jira] [Created] (CAY-1606) Change CayenneModeler new object naming strategy

Change CayenneModeler new object naming strategy
------------------------------------------------

                 Key: CAY-1606
                 URL: https://issues.apache.org/jira/browse/CAY-1606
             Project: Cayenne
          Issue Type: Improvement
    Affects Versions: 3.1M2
            Reporter: Andrus Adamchik


Default modeler object naming (UntitledDomain, UntiltledDomainMap) trickles to the XML file naming, resulting in mixed case names that look rather ugly. A suggested new naming strategy is the following:
* "project" for domains (there can be only 1 per project in 3.1), 
* "datamap", "datamap1", etc. for DataMaps.
* "datanode", "datanode1", "datanode2", etc. for DataNodes
* "dbentity", "dbentity1", etc. for DbEntities
* "objentity", "objentity1", etc. for ObjEntities
* Same for procedures, queries and embeddables.

These will result in cleaner file names like cayenne-project.xml, datamap.map.xml etc.

Also IIRC the same strategy is used in places outside the Modeler (cdbimport?) so we'll need to check what gets affected by this change, and whether we can place the strategy in a corresponding DI module (not the main ServerModule)??

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAY-1606) Change CayenneModeler new object naming strategy

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

Dzmitry Kazimirchyk commented on CAY-1606:
------------------------------------------

> Also IIRC the same strategy is used in places outside the Modeler (cdbimport?)
Just checked it: cdbimport uses NamingStrategies and Modeler uses NamedObjectFactory, so minus one problem.

And also, did I understand correctly that you suggest to use default lower case names for dbentity, objentity, procedure, query, etc?

> Change CayenneModeler new object naming strategy
> ------------------------------------------------
>
>                 Key: CAY-1606
>                 URL: https://issues.apache.org/jira/browse/CAY-1606
>             Project: Cayenne
>          Issue Type: Improvement
>    Affects Versions: 3.1M2
>            Reporter: Andrus Adamchik
>
> Default modeler object naming (UntitledDomain, UntiltledDomainMap) trickles to the XML file naming, resulting in mixed case names that look rather ugly. A suggested new naming strategy is the following:
> * "project" for domains (there can be only 1 per project in 3.1), 
> * "datamap", "datamap1", etc. for DataMaps.
> * "datanode", "datanode1", "datanode2", etc. for DataNodes
> * "dbentity", "dbentity1", etc. for DbEntities
> * "objentity", "objentity1", etc. for ObjEntities
> * Same for procedures, queries and embeddables.
> These will result in cleaner file names like cayenne-project.xml, datamap.map.xml etc.
> Also IIRC the same strategy is used in places outside the Modeler (cdbimport?) so we'll need to check what gets affected by this change, and whether we can place the strategy in a corresponding DI module (not the main ServerModule)??

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAY-1606) Change CayenneModeler new object naming strategy

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

Andrus Adamchik commented on CAY-1606:
--------------------------------------

> And also, did I understand correctly that you suggest to use default lower case names for dbentity, objentity, procedure, query, etc? 

Yeah sorry overlooked the specifics of these objects. This is a question of what is a better default for a given object type. DB tables naming schemes can be anything - all UPPERCASE, all lowercase, and MixedCase. So ideally this should be a preference somewhere, but to simplify it, let's make it lowercase... Maybe use underscores, e.g. "db_entity", "db_entity1", etc. Same for procedures.

ObjEntities are descriptors of Java classes, so we probably need to use mixed case. So a default name would be ObjEntity, ObjEntity1, etc.

If there is an analogue for query that would be a Java method, so I guess query, query1 is appropriate.



> Change CayenneModeler new object naming strategy
> ------------------------------------------------
>
>                 Key: CAY-1606
>                 URL: https://issues.apache.org/jira/browse/CAY-1606
>             Project: Cayenne
>          Issue Type: Improvement
>    Affects Versions: 3.1M2
>            Reporter: Andrus Adamchik
>
> Default modeler object naming (UntitledDomain, UntiltledDomainMap) trickles to the XML file naming, resulting in mixed case names that look rather ugly. A suggested new naming strategy is the following:
> * "project" for domains (there can be only 1 per project in 3.1), 
> * "datamap", "datamap1", etc. for DataMaps.
> * "datanode", "datanode1", "datanode2", etc. for DataNodes
> * "dbentity", "dbentity1", etc. for DbEntities
> * "objentity", "objentity1", etc. for ObjEntities
> * Same for procedures, queries and embeddables.
> These will result in cleaner file names like cayenne-project.xml, datamap.map.xml etc.
> Also IIRC the same strategy is used in places outside the Modeler (cdbimport?) so we'll need to check what gets affected by this change, and whether we can place the strategy in a corresponding DI module (not the main ServerModule)??

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CAY-1606) Change CayenneModeler new object naming strategy

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

Dzmitry Kazimirchyk closed CAY-1606.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1M3
         Assignee: Dzmitry Kazimirchyk

Changed naming to following:
domain -> "project"
DataNode -> "datanode", "datanode1", etc.
DataMap -> "datamap", "datamap1", etc.
DbEntity -> "db_entity", "db_entity1", etc.
ObjEntity -> "ObjEntity", "ObjEntity1", etc.
Embeddable -> "Embeddable", "Embeddable1", etc.
Procedure -> "procedure", "procedure1", etc.
Query -> "query", "query1", etc.

> Change CayenneModeler new object naming strategy
> ------------------------------------------------
>
>                 Key: CAY-1606
>                 URL: https://issues.apache.org/jira/browse/CAY-1606
>             Project: Cayenne
>          Issue Type: Improvement
>    Affects Versions: 3.1M2
>            Reporter: Andrus Adamchik
>            Assignee: Dzmitry Kazimirchyk
>             Fix For: 3.1M3
>
>
> Default modeler object naming (UntitledDomain, UntiltledDomainMap) trickles to the XML file naming, resulting in mixed case names that look rather ugly. A suggested new naming strategy is the following:
> * "project" for domains (there can be only 1 per project in 3.1), 
> * "datamap", "datamap1", etc. for DataMaps.
> * "datanode", "datanode1", "datanode2", etc. for DataNodes
> * "dbentity", "dbentity1", etc. for DbEntities
> * "objentity", "objentity1", etc. for ObjEntities
> * Same for procedures, queries and embeddables.
> These will result in cleaner file names like cayenne-project.xml, datamap.map.xml etc.
> Also IIRC the same strategy is used in places outside the Modeler (cdbimport?) so we'll need to check what gets affected by this change, and whether we can place the strategy in a corresponding DI module (not the main ServerModule)??

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira