Specified method is not supported

Specified method is not supported

Postby dilbert » Mon 08 Jun 2009 11:04

I'm currently using dotConnect for MySql 5.20.33.

Now I experience a strange problem with very simple query:
Code: Select all
from eq in DB.ExamQuestions
join eqr in DB.ExamQuestionRanks on eq.Id equals eqr.Id_question
select eq;


executed on these tables (I omit some columns which are not participating in the query and indexes):
Code: Select all
CREATE TABLE `exam_question` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Question` text,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `exam_question_rank` (
  `Id_question` int(11) NOT NULL,
  `Date_update` datetime NOT NULL,
  PRIMARY KEY (`Id_question`),
  CONSTRAINT `FK_Exam_question_rank_Exam_question` FOREIGN KEY (`Id_question`) REFERENCES `exam_question` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


I always get this error:
Code: Select all
[NotSupportedException: Specified method is not supported.]
   Devart.Data.Linq.Provider.Query.a.a(an A_0) +219
   Devart.Data.Linq.Provider.Query.SqlVisitor.a(SqlNode A_0) +136
   Devart.Data.Linq.Provider.Query.SqlVisitor.c(SqlExpression A_0) +36
   Devart.Data.Linq.Provider.Query.SqlVisitor.a(a9 A_0) +177
   Devart.Data.Linq.Provider.Query.SqlVisitor.a(SqlNode A_0) +1797
   Devart.Data.Linq.Provider.Query.SqlVisitor.e(SqlNode A_0) +36
   Devart.Data.Linq.Provider.Query.SqlVisitor.e(bo A_0) +103
   Devart.Data.Linq.Provider.Query.SqlVisitor.a(bo A_0) +39
   Devart.Data.Linq.Provider.Query.SqlVisitor.a(ax A_0) +130
   Devart.Data.Linq.Provider.Query.a.a(ax A_0) +89
   Devart.Data.Linq.Provider.Query.SqlVisitor.a(SqlNode A_0) +2574
   Devart.Data.Linq.Provider.Query.bf.a(SqlNode A_0, SqlNode A_1, SqlFactory A_2, ao A_3) +83
   Devart.Data.Linq.Provider.DataProvider.a(c A_0, Type A_1, SqlNode A_2, IList`1 A_3) +391
   Devart.Data.Linq.Provider.DataProvider.a(Expression A_0) +236
   Devart.Data.Linq.Provider.DataProvider.h(Expression A_0) +168
   Devart.Data.Linq.DataQuery`1.i() +53
   Aviationexam.BO.Reports.BOExamReports.ComputeProgressAreas(Int32 idExam, Int32 idLevel, String testMode)
...



The problem is really strange, because I have over 100 tables in my project and I'm using much more complicated queries without any problem. So I do not understand this error.
Thank you for your help in advance.
dilbert
 
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Postby dilbert » Mon 08 Jun 2009 14:30

After several other experiments, I've found out that exception is thrown if both fields in JOIN condition are primary keys (in other words - if the cardinality is ONE-TO-ONE).
dilbert
 
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Postby Shalex » Wed 10 Jun 2009 10:39

The problem is fixed. Look forward to the next build of dotConnect for MySQL.
Shalex
Devart Team
 
Posts: 7833
Joined: Thu 14 Aug 2008 12:44

Postby dilbert » Wed 10 Jun 2009 11:32

Thank you!
dilbert
 
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Postby dilbert » Wed 17 Jun 2009 14:48

Shalex wrote:The problem is fixed. Look forward to the next build of dotConnect for MySQL.


Can you please specify when are you supposed to release the next build?
Thanks
dilbert
 
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Postby AndreyR » Wed 17 Jun 2009 14:54

We plan to release the new build next week.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to LinqConnect (LINQ to SQL support)