SQL exception preparing query with ORMLite

后端 未结 4 461
一向
一向 2021-01-15 05:58

I am using an ORM (ORMlite) and all my calls are going well until I get the following error.

Exception in thread \"main\" org.h2.jdbc.JdbcSQLExceptio

4条回答
  •  佛祖请我去吃肉
    2021-01-15 06:46

    The correct syntax for the statement would be:

    SELECT * FROM Stories WHERE title = 'Deepcut case leads ''not followed'' ';
    

    Note the duplicated single quotes inside the string literal.

    You will need to tell your ORM layer to follow the ANSI SQL rules for literals.

提交回复
热议问题