Bug: Entity Framework keyword column name not escaped

Bug: Entity Framework keyword column name not escaped

Postby ivanz » Tue 22 Jun 2010 12:10

Hello,

I am evaluating the MySql provider for Entity Framework, but I have hit a bug which doesn't allow me to finish my testings. One of the tables in the DB I am using has a column named "level". This however appears to be a reserved keyword, which isn't escaped in the query leading to an SQL error and an EntityCommandExecutionException:

Code: Select all
SELECT
Extent1.id AS id,
Extent1.test_id AS test_id,
Extent1.name AS name,
Extent1.release AS release,
Extent1.level AS level,                 <---- ### HERE ###
Extent1.state_id AS state_id,
Extent1.completed_shifts AS completed_shifts,
Extent1.`delete` AS `delete`
FROM mydb.mytable AS Extent1
WHERE Extent1.test_id = :EntityKeyValue1


I can't change the database, because I don't own it, so can someone provide a fix or a workaround?

The exception is:
Code: Select all
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'release,
Extent1.level AS level,
Extent1.state_id AS state_id,
Extent1.com' at line 5


   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Objects.ObjectQuery`1.Execute(MergeOption mergeOption)
   at System.Data.Objects.DataClasses.EntityCollection`1.Load(List`1 collection, MergeOption mergeOption)
   at System.Data.Objects.DataClasses.EntityCollection`1.Load(MergeOption mergeOption)
   at System.Data.Objects.DataClasses.RelatedEnd.Load()
   at System.Data.Objects.DataClasses.RelatedEnd.DeferredLoad()
   at System.Data.Objects.DataClasses.EntityCollection`1.GetEnumerator()
ivanz
 
Posts: 4
Joined: Tue 22 Jun 2010 12:02

Postby AndreyR » Wed 23 Jun 2010 08:10

Thank you for the report, we are investigating the issue.
I will let you know about the results of our investigation.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby ivanz » Wed 30 Jun 2010 12:02

Hi,

Is there any update on this issue? (sorry for being impatient)
ivanz
 
Posts: 4
Joined: Tue 22 Jun 2010 12:02

Postby AndreyR » Thu 01 Jul 2010 12:36

Our investigation is in progress. I will post here as soon as the problem is fixed.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby AndreyR » Tue 06 Jul 2010 10:18

The problem is fixed. The new build will be available this week.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby ivanz » Thu 08 Jul 2010 12:23

Great, but my trial has expired meanwhile and due to the bug I haven't really been able to try out dotConnect for MySQL. Can I get a trial extension, please?
ivanz
 
Posts: 4
Joined: Tue 22 Jun 2010 12:02

Postby AndreyR » Thu 08 Jul 2010 13:35

You can download the 5.80.146 build of dotConnect for MySQL with prolonged evaluation using this link.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby ivanz » Thu 08 Jul 2010 15:10

AndreyR wrote:You can download the 5.80.146 build of dotConnect for MySQL with prolonged evaluation using this link.


Thanks, but this is dotConnect Oracle instead of dotConnect MySQL.
ivanz
 
Posts: 4
Joined: Tue 22 Jun 2010 12:02

Postby AndreyR » Fri 09 Jul 2010 13:26

Sorry, here is the correct link.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for MySQL