1

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?)

Aurelio De Rosa
  • 21,856
  • 8
  • 48
  • 71
qdot
  • 6,195
  • 5
  • 44
  • 95

1 Answers1

2

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

saintedlama
  • 6,838
  • 1
  • 28
  • 46
  • 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 Sep 13 '10 at 09:59
  • 2
    You're right the issue is not fixed for MySQL. I'll take a look! – saintedlama Sep 16 '10 at 04:55