Bug with nested queries

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Bug with nested queries

Post by dilbert » Wed 26 May 2010 11:35

After upgrading to the latest version (dotConnect for MySQL 5.80.140) some our queries run into exception.

Please, try the following scenario:

Code: Select all

var list1 = from t1 in DB.Table1
                select new { t1.Id, t1.Column1 };

foreach (var row in list1)
If Column1 in first table is nullable (e.g. int?) and the value in database is NULL then the first iteration cycle throws exception 'Specified cast is not valid' after the first iteration. If the nested query is omitted, the query executes correctly.
These queries worked properly in previous versions.

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

Post by AndreyR » Fri 28 May 2010 10:14

I have just tried to reproduce the problem using simple tables and failed. Could you please send us (support * devart * com, subject "LINQ: Specified cast is not valid") a small test project illustrating the problem?
Please include the script of the DB object used in the project and some sample data to reproduce the problem on.

Post Reply