views:

46

answers:

1

Hi!

I have a column named 'Key' in a MySQL database. Seems that the

repo.Find<Class>(x=>x.Key.StartsWith("BLAH")); 

generates the SQL code

WHERE Key LIKE 'BLAH%'

instead of the correct one like

WHERE `Key` LIKE 'BLAH%'

How can I force the later behaviour (is it a bug in SubSonic?)

Cheers, Tomasz

+2  A: 

You can use the latest source from git - this is a bug that was resolved since releasing 3.0.0.4

Saintedlama
Hi! Can you point me to a specific commit? 8a3f14d8e21409ddf390581aefedf07393eb990a seems to have the same issue: MySql.Data.MySqlClient.MySqlException: 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 'Key LIKE 'S%'' at line 3
qdot
You're right the issue is not fixed for MySQL. I'll take a look!
Saintedlama