LinqConnect Model not supporting custom PostgreSQL data types (domains)

LinqConnect Model not supporting custom PostgreSQL data types (domains)

Postby claflamme » Wed 01 Jun 2016 19:03

We are using a custom field data type to store email addresses defined like this in PostgreSQL:

CREATE DOMAIN schema1."d_Email"
AS character varying(50)
COLLATE pg_catalog."default"
CONSTRAINT "d_Email_check" CHECK (rubixprocessing."f_IsValidEmail"(VALUE::text) = true);
ALTER DOMAIN schema1."d_Email"

When using linqConnect and adding a table using this data type to the model, we get the following error:

The ServerDataType value of the Column element 'Email' in the Type element 'Person' is not valid. The data type 'D_EMAIL' is not supported.

We are testing linqConnect for the first time to see if we could use it in our projects. We are blocked on this issue.
claflamme
 
Posts: 1
Joined: Wed 01 Jun 2016 18:50

Re: LinqConnect Model not supporting custom PostgreSQL data types (domains)

Postby Shalex » Fri 03 Jun 2016 14:59

LinqConnect works with a specific set of primitive data types only: https://www.devart.com/linqconnect/docs/?postgresql_datatypemapping.html. User defined types are not supported.

As a workarond, please work with domains via plain ADO.NET classes (PgSqlConnection / PgSqlCommand / etc).
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL