Search code examples
sqlmysqlsubsonicsubsonic3subsonic-simplerepository

SubSonic column named 'Key'


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


Solution

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