cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAY-1606) Change CayenneModeler new object naming strategy
Date Fri, 02 Sep 2011 11:02:09 GMT

    [ 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

        

Mime
View raw message