Squeryl generates invalid SQL for empty 'IN ()' statements
When I pass empty collection to squeryl's "in" operator, the generated SQL contains statement
, which is rejected by MySQL as SQL error. From what I could find, SQL disallows empty "IN" (see http://bugs.mysql.com/bug.php?id=12474). Thus, if empty collection is passed to squeryl's in, instead of
should be generated
`field_name` IN ()
, which is rejected by MySQL as SQL error. From what I could find, SQL disallows empty "IN" (see http://bugs.mysql.com/bug.php?id=12474). Thus, if empty collection is passed to squeryl's in, instead of
`field_name` IN ()
should be generated
FALSE
Leave a comment
on 2012-03-01 21:37 *
By maxime.levesque
Can you describe how your case differs from this one :
http://github.com/max-l/Squeryl/blob/master/src/test/scala/org/squeryl/test/musicdb/MusicDb.scala#L1398
_.firstName in Nil is translated into : 1 = 0, because it will always be false.
Which version of Squeryl ?
http://github.com/max-l/Squeryl/blob/master/src/test/scala/org/squeryl/test/musicdb/MusicDb.scala#L1398
_.firstName in Nil is translated into : 1 = 0, because it will always be false.
Which version of Squeryl ?