6

I have a table named group in a mysql db. When I map this table to squeryl I get SQL syntax errors since the table name group is not quoted (should be select * from `group`).

Is there any way I can tell squeryl to quote certain table names?

Fredrik Jansson
  • 3,764
  • 3
  • 30
  • 33

2 Answers2

2

GROUP is a reserved word in SQL, so I'd recommend renaming your table to something else. (I'm guessing this is the cause of this issue.)

John Parker
  • 54,048
  • 11
  • 129
  • 129
2

Have you tried :

val groups = table[Group]("`group`")

?

Max L.
  • 9,774
  • 15
  • 56
  • 86