Comment #2 on issue 105 by jonmpryor: DbMetal naming conventions
http://code.google.com/p/dblinq2007/issues/detail?id=105
/language=ivl no longer seems to work, and DbMetal still generates bizarro-
capitalization. This still needs improvement.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
I've seen that you can leave the capitalization as the original by passing
the
parameter "/case=leave", but the underscores continues to be removed in the
name of
the classes...
I've downloaded the source code and debuged it.
If the this code is putted in "NameFormatter.GetTableName" method the
original table
names are returned:
if (nameFormat.Case == Case.Leave) {
tableName.ClassName = dbName;
tableName.MemberName = dbName;
} else {
tableName.NameWords = ExtractWords(words, dbName,
extraction);
// if no extraction (preset name, just copy it)
if (extraction == WordsExtraction.None)
tableName.ClassName = tableName.DbName;
else
tableName.ClassName = Format(words, tableName.NameWords,
nameFormat.Case, GetSingularization(Singularization.Singular, nameFormat));
tableName.MemberName = Format(words, tableName.NameWords,
nameFormat.Case, GetSingularization(Singularization.Plural, nameFormat));
}
But I don't know if this could affect other parameters...
The same must be made for the other name formatter methods to have the same
names of
the database in another items.
Issue 178 has been merged into this issue.
Comment #6 on issue 105 by jonmpryor: DbMetal naming conventions
http://code.google.com/p/dblinq2007/issues/detail?id=105
(No comment was entered for this change.)
I can confirm it.
This is not compatible with SQLMetal.
Consider such name -- art_AgentVersion
With SQLMetal I would get: Art_AgentVersion
But with DBMetal I get: ArtAgentVersion (underscore removed)
DBLinq 0.20.1
PS. Other oddities:
Id is converted to ID
URL is converted to Url (please note the asymmetry)
Btw. it is not the problem with an option (using it or not), simply put the
output should be the same as SQLMetal creates (in default run). Otherwise
it is troublesome to migrate projects from SQLMetal to DBMetal.