Page 1 of 1

Linq to Entity(postgresql) System.InvalidCastExce about uuid

Posted: Mon 08 Mar 2010 07:15
by alex1031s
This is my sql table schema for postgresql

CREATE TABLE employee
(
id uuid PRIMARY KEY,
emp_no varchar NOT NULL ,
emp_password varchar NOT NULL
);

and this is my Code with VB 2008

Dim testGuid As Guid = Guid.NewGuid
Dim employee = From emp In db.Employees _
Where emp.Id = testGuid _
Select emp

and this is my error

'System.InvalidCastException' 發生於 Devart.Data.PostgreSql.Linq.dll
無法將型別 'Devart.Data.Linq.Provider.ProviderType' 的物件轉換為型別 'Devart.Data.PostgreSql.Linq.Provider.PgSqlProviderType'。

when we use uuid to select will have this error

Posted: Tue 09 Mar 2010 15:55
by AndreyR
Thank you for the report, we have reproduced the problem.
I will let you know about the results of our investigation.

Same problem in LINQ to SQL

Posted: Thu 11 Mar 2010 06:48
by nbanek
I'm getting this error also, but in LINQ to SQL (my query works in LINQ to Entity). Love to know what you find out.

Posted: Thu 11 Mar 2010 14:09
by AndreyR
Yes, the problem is LINQ to SQL-specific.
We have found and fixed the error, the fix will be available in the nearest build.

Posted: Tue 23 Mar 2010 17:01
by tonyhsieh6447
In the 4.9 version of this issue is resolved?please tell me.Thank you.

I did not realize there was a new release available...

Posted: Tue 23 Mar 2010 17:04
by nbanek
where can I download the new release to test this?

Posted: Wed 24 Mar 2010 11:25
by Shalex
The new build with the mentioned fix will be available in several days. I will post here when it is available for download.

Posted: Thu 01 Apr 2010 08:12
by Shalex
dotConnect for PostgreSQL v 4.90 is released!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=17517 .