static void go() {
PersistenceManager pm = null;
Transaction tx = null;
try {
pm = new JDOFactory().getFactory().getPersistenceManager();
tx = pm.currentTransaction();
Query q = pm.newQuery("javax.jdo.query.SQL", "select * from \"OAUTHTEMP\" where \"O_AUTH_TOKEN\"=:oAuthToken and \"O_AUTH_VERIFIED\"=:oAuthVerified");
Map params = new HashMap();
params.put("oAuthToken", "08f727ab-7132-426c-8fc2-9ce2b30ebf9d");
params.put("oAuthVerifier", "C3ExGzv+cAQkOqwL4oY94fZhDyVLyo/0H31w8F3q+YYLSBDxl2YARcglqPuKcsfT");
List<OAuthTemp> result = (List<OAuthTemp>) q.executeWithMap(params);
} catch (Exception e) {
e.printStackTrace();
}
}这是我在令牌和验证器的基础上获取所有数据的函数,但下面是例外情况:
SQL查询类在SELECT : select * from "OAUTHTEMP“中没有持久字段,其中"O_AUTH_TOKEN"=:oAuthToken和"O_AUTH_VERIFIED"=:oAuthVerified查询类在select : SELECT * from "OAUTHTEMP”中"O_AUTH_TOKEN"=:oAuthToken和"O_AUTH_VERIFIED"=:oAuthVerified org.datanucleus.store.rdbms.query.SQLQuery.prepareForExecution(SQLQuery.java:994) at org.datanucleus.store中没有持久字段。.rdbms.query.SQLQuery.executeWithMap(SQLQuery.java:818) at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:369) at org.datanucleus.api.jdo.JDOQuery.executeWithMap(JDOQuery.java:276) at com.xenonstack.demo.test.Test.go(Test.java:61) at com.xenonstack.demo.test.Test.main(Test.java:40)
我的OAuthTemp类是这个OauthTemp类。
发布于 2016-02-25 13:47:32
您似乎有一个名为oAuthVerified的参数的查询,但它为oAuthVerifier提供了一个值。也许你能解决这个问题吗?
https://stackoverflow.com/questions/35627972
复制相似问题