Page 1 of 1

Specified method is not supported

Posted: Mon 08 Jun 2009 11:04
by dilbert
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.

Posted: Mon 08 Jun 2009 14:30
by dilbert
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).

Posted: Wed 10 Jun 2009 10:39
by Shalex
The problem is fixed. Look forward to the next build of dotConnect for MySQL.

Posted: Wed 10 Jun 2009 11:32
by dilbert
Thank you!

Posted: Wed 17 Jun 2009 14:48
by dilbert
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

Posted: Wed 17 Jun 2009 14:54
by AndreyR
We plan to release the new build next week.