[Mono-list] SqlMetal to PostgreSQL

Abe Gillespie abe.gillespie at gmail.com
Sun Feb 7 21:36:13 EST 2010


I had brought this issue up a while back along with the "money" type.
And although the issue was marked as fixed, it seems as though there
was a major refactoring and now I cannot find the source file that
included these type mappings.

My question to the developers: is there no way to integrate this type
mapping stuff with the NpgsqlTypes.* classes?  I see that the
NpgsqlTypes.NpgsqlTypesHelper is an internal class, but can't the
source code be cannibalized somehow? I'm now license expert, but it
seems permissible enough:
http://npgsql.projects.postgresql.org/license.html

-Abe

On Sun, Feb 7, 2010 at 7:45 PM, Costantino Pipero <cos at beeond.net> wrote:
> Having failed to use sqlmetal for MySql, I ported my data to Postgres.
>
> Now, this time the sqlmetal command finds the right provider, but it chokes
> on a data type with the error:
>
> sqlmetal failed:System.ArgumentException: Don't know how to convert the SQL
> type 'timestamp with time zone' into a managed type.
> Parameter name: dataType
>   at DbLinq.Vendor.Implementation.SchemaLoader.MapDbType (System.String
> columnName, IDataType dataType) [0x00000] in <filename unknown>:0
>   at DbLinq.Vendor.Implementation.SchemaLoader.LoadColumns
> (DbLinq.Schema.Dbml.D
> atabase schema, DbLinq.Schema.SchemaName schemaName, IDbConnection conn,
> INameAl
> iases nameAliases, DbLinq.Schema.NameFormat nameFormat,
> DbLinq.Vendor.Implementa
> tion.Names names) [0x00000] in <filename unknown>:0
>   at DbLinq.Vendor.Implementation.SchemaLoader.Load (System.String
> databaseName,
>  INameAliases nameAliases, DbLinq.Schema.NameFormat nameFormat, Boolean
> loadStor
> edProcedures, System.String contextNamespace, System.String entityNamespace)
> [0x
> 00000] in <filename unknown>:0
>   at DbMetal.Generator.Implementation.Processor.ReadSchema
> (DbMetal.Parameters p
> arameters, ISchemaLoader& schemaLoader) [0x00000] in <filename unknown>:0
>   at DbMetal.Generator.Implementation.Processor.ProcessSchema
> (DbMetal.Parameter
> s parameters) [0x00000] in <filename unknown>:0
>
> If anyone has a workaround (possibly not implying changing that datatype),
> I'd appreciate. I have been trying to get this going for 2 months...
> I guess I will try with MSSQL and see what happens....
>
> Thank you
> Cos
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>


More information about the Mono-list mailing list