Linq to Entity(postgresql) System.InvalidCastExce about uuid

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
alex1031s
Posts: 3
Joined: Wed 24 Feb 2010 09:02

Linq to Entity(postgresql) System.InvalidCastExce about uuid

Post by alex1031s » Mon 08 Mar 2010 07:15

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

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 09 Mar 2010 15:55

Thank you for the report, we have reproduced the problem.
I will let you know about the results of our investigation.

nbanek
Posts: 5
Joined: Wed 10 Feb 2010 15:14

Same problem in LINQ to SQL

Post by nbanek » Thu 11 Mar 2010 06:48

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 11 Mar 2010 14:09

Yes, the problem is LINQ to SQL-specific.
We have found and fixed the error, the fix will be available in the nearest build.

tonyhsieh6447
Posts: 3
Joined: Tue 23 Mar 2010 16:54
Location: Taiwan

Post by tonyhsieh6447 » Tue 23 Mar 2010 17:01

In the 4.9 version of this issue is resolved?please tell me.Thank you.

nbanek
Posts: 5
Joined: Wed 10 Feb 2010 15:14

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

Post by nbanek » Tue 23 Mar 2010 17:04

where can I download the new release to test this?

Shalex
Site Admin
Posts: 8239
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 24 Mar 2010 11:25

The new build with the mentioned fix will be available in several days. I will post here when it is available for download.

Shalex
Site Admin
Posts: 8239
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 01 Apr 2010 08:12

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 .

Post Reply