我当前的查询如下,它适用于单个用户:
1
ao.find(da.class, Query.select().where("user=?",user)
现在,我想更改此查询以获取多用户数据,如下所示,但它不起作用并且给了我无效的列名。
1
ao.find(da.class, Query.select().where("user IN (?)",user)
此外,尝试通过应用单引号。即使是单个用户输入参数值也无法正常工作并给出相同的错误。
任何人都可以建议我出了什么问题并且必须在这里纠正吗?
错误为 ,
Caused by: java.sql.SQLException: Column not found: user in statement [SELECT * FROM PUBLIC.AO_0371A8_da WHERE "user" IN (?)]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.prep
或 when - where("used "('?')" 并为单个用户验证
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: Column not found: user in statement [SELECT * FROM PUBLIC.AO_0371A8_da WHERE "user" IN ('?')]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.prepareState
谢谢你