I used the DbMetal tool to generate a class for my database. It worked, but then I added some "char" types to the database. Now when I try to generate the class I get the error
DbMetal : Don't know how to convert the SQL type '"char"' into a managed type. Parameter name : dataType
Has anyone encountered this? Is there a workaround or an alternative?
Thanks in advance!
Do you really mean
"char"
which is a special Postgres type for the storage of a single byte of information? Or did you meanchar(n)
orvarchar(n)
?In general, outside of some rare cases,
varchar()
andtext
are far preferred. Unless you quote"char"
it assumes you mean the standard SQLchar
type. This is not one of the more self-documenting decisions in PostgreSQL....It would not surprise me if
"char"
is poorly supported. If you really need to use it (or even if not) it would be worth filing a bug report with nogsql if this is still happening. As a workaround use a standard type milechar(1)
.