1. Entity type names after first letter are capitalized randomly: some
random characters inside name are in upper case.
How to force previous behaviour so that only first character is capitalized
and xml file can be used for exceptions ?
2. All property names are lowercace.
How to force previous behaviour so that first letter of property name is in
uppercase and fieldrenames.xml can be used for exceptions ?
3. Fields names contain randomly capitalized characters.
Andrus.
my sqlmetal.exe.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="parameters"
type="System.Configuration.AppSettingsSection" />
<section name="providers" type="SqlMetal.ProvidersSection, SqlMetal" />
</configSections>
<appSettings>
</appSettings>
<parameters>
<add key="forceUcaseTableName" value="True"/>
<add key="forceUcaseFieldName" value="True"/>
<add key="user" value="admin"/>
<add key="database" value="mydb"/>
<add key="server" value="localhost"/>
<add key="verboseForeignKeys" value="true"/>
<add key="namespace" value="MyApp.Entity"/>
<add key="renamesFile" value="MyFieldRenames.xml"/>
<add key="forceUcaseID" value="false"/>
<add key="useDomainTypes" value="false"/>
<add key="readLineAtExit" value="true"/>
<add key="EntityInterfaces"
value="MyApp.Business.EntityBase,INotifyPropertyChanging,INotifyPropertyChanged"/>
<!-- picrap: don't know what it is
<add key="ns" value="LinqMysql.user"/>
-->
</parameters>
<providers>
<providers>
<provider name="MySql"
dbLinqSchemaLoader="DbLinq.MySql.MySqlSchemaLoader, DbLinq.MySql"
databaseConnection="MySql.Data.MySqlClient.MySqlConnection,
MySql.Data" />
<provider name="Oracle"
dbLinqSchemaLoader="DbLinq.Oracle.OracleSchemaLoader, DbLinq.Oracle"
databaseConnection="System.Data.OracleClient.OracleConnection,
System.Data.OracleClient" />
<provider name="OracleODP"
dbLinqSchemaLoader="DbLinq.Oracle.OracleSchemaLoader, DbLinq.Oracle"
databaseConnection="Oracle.DataAccess.Client.OracleConnection,
Oracle.DataAccess" />
<provider name="PostgreSql"
dbLinqSchemaLoader="DbLinq.PostgreSql.PgsqlSchemaLoader, DbLinq.PostgreSql"
databaseConnection="Npgsql.NpgsqlConnection,
Npgsql" />
<provider name="Sqlite"
dbLinqSchemaLoader="DbLinq.Sqlite.SqliteSchemaLoader, DbLinq.Sqlite"
databaseConnection="System.Data.SQLite.SQLiteConnection,
System.Data.SQLite" />
</providers>
</providers>
</configuration>
> could you provide a small dbml file that reproduces the issue?
> I can take a look at it in about 10 days.
dbml file attached.
I cc:d to you directly also since not sure how this group treats
attachments. Note random capitalization of table names.
Also trying to create code or schema from Northwind db does not work:
D:\dblinq\SqlMetal\bin>SQLMetal.exe -Dbml=northwind.dbml -Provider=PostgreSql
-
user:admin -database:Northwind -server:localhost -password:linq2
No tables found for schema Northwind, exiting
SqlMetal failed:System.NullReferenceException: Object reference not set to
an in
stance of an object.
at DbLinq.Schema.DbmlSerializer.Write(Stream xmlStream, Database dbml) in
D:\
dblinq\DbLinq\Schema\DbmlSerializer.cs:line 102
at SqlMetal.Program.Main(String[] args) in
D:\dblinq\SqlMetal\Program.cs:line
80
Other notes:
1. Can anybody review/commit my last patch posted in this list or give my
non-gmail address commit rights.
2. Partial property update test WriteTest().G9_UpdateOnlyChangedProperty()
still fails.
Andrus.
> since I'm the guilty guy who changed SqlMetal behavior, I'm going to
> take a look at it. As usual, could you make a post on the bugtracker?
> I'll take a look at it soon.
Done.
http://code.google.com/p/dblinq2007/issues/detail?id=48
Andrus.
To reproduce:
1. Run sqlmetal against nortwind database:
SQLMetal.exe -Provider=PostgreSql -forceUcaseID=false -forceUcaseFieldName -forceUcaseTableName
-verboseForeignKeys -user:postgres -database:northwind -server:localhost -password:xxxxx
2. Look into northwind.cs file.
Expected output:
Only first character in property and table names should be capitalized.
Observed:
1. English language word list is used for captialization. It it not possible
to turn this off.
2. Some characters in some names are randomly capitalized:
[Column(Storage = "hiredAte", ...
HiredAte
QuantityPeruNit
UnitsInsToCK
[Association(Storage = "fKTeRrRegion",
fKProdCatG
3. pgsqlfieldranames.xml content is ignored during processing.
>I just placed a new experimental version of the capitalization
> algorithm on the SVN repository:
Thak you.
I tried todays version. I noticed
that -forceUcaseID=false -forceUcaseFieldName -forceUcaseTableName
parameters are not accepted anymore.
I need the following rules for PostgreSQL. They worked in earlier version
but not in todays version:
1. Make only first letter in every table and property name in upper case.
All other characters must be in lower case.
2. Use pluralization/singularizaton.
3. Allow to specify exceptions for the rules above in xml file.
Any idea how to get this result ?
Andrus.
This is not critical issue since we can use find/replace in text editor to
fix.
However it would be nice to eliminate the need to use Find/Replace.
Andrus.
from
http://code.google.com/p/support/wiki/WhatsNew
Sept 2007
Project owners and members can now be specified with the full email address
of any Google Account.
Can I use my email kobruleht2 at hot point ee
> but where is the problem with your gmail account?
I don'nt have it.
I created it now if previous email still fails.
kobruleht2 at gmail dot com
Andrus.
English dictionary usage makes incorrect results. Eq. in nortwhind, it
generates HiredAte while correct it HireDate.
If there are large number of names or schema is not known it is difficult to
add all names to xml file.
It is not reasonable to create case-sensitive names in database: sql is case
insensitive language.
How to specify other language file or disable english dictionary usage so
that
only first letter is
capitalized always ?
> 2. Use pluralization/singularizaton.
> --> /pluralize now works
I created cs files with and without -pluralize switch
Result code is exactly the same.
> 3. Allow to specify exceptions for the rules above in xml file.
> --> the dictionary works again and no further processing is done
> if a name is found in the dictionary. Please note that I didn't test
> this case.
I added line to config file:
<add key="renamesFile" value="pgsqlFieldRenames.xml"/>
sqlmetal shows : Loading renames file: PgsqlFieldRenames.xml
HireDate still appears as HiredAte in generated cs file.
Andrus.