Play freamwork scala and mysql error
I have play framework(scala) working with mysql on my os ubuntu
I have example code
val computers = SQL(
"""
select * FROM 'computer'
where 'computer.tytul' like {filter}
order by {orderBy} nulls last
limit {pageSize} offset {offset}
"""
).on(
'pageSize -> pageSize,
'offset -> offest,
'filter -> filter,
'orderBy -> orderBy
).as(Computer.withCompany *)
That yields the following error when I use it with MySQL
[MySQLSyntaxErrorException: 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 ''computer' where 'computer.tytul' like '%%' order by 2
nulls' at line 1]
That code was working with database in memory!
Can somebody help?
No comments:
Post a Comment