Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google app engine 带IN子句的JPA查询_Google App Engine_Jpa - Fatal编程技术网

Google app engine 带IN子句的JPA查询

Google app engine 带IN子句的JPA查询,google-app-engine,jpa,Google App Engine,Jpa,我正在使用谷歌应用程序引擎和JPA。我试图执行以下查询 List<String> countryList = new ArrayList<String>(); countryList.add("DE"); countryList.add("EN"); Query q = em.createQuery("select t from FOO t where t.country IN :country "); q.setParameter("country", c

我正在使用谷歌应用程序引擎和JPA。我试图执行以下查询

List<String> countryList = new ArrayList<String>();
countryList.add("DE");
countryList.add("EN");      

Query q = em.createQuery("select t from FOO t where t.country IN :country ");
q.setParameter("country", countryList);
List countryList=new ArrayList();
国家名单。添加(“DE”);
国家列表。添加(“EN”);
Query q=em.createQuery(“从FOO t中选择t,其中t.country IN:country”);
q、 设置参数(“国家”,国家列表);
我收到一个例外,Google App Engine数据存储不支持IN Operator。有人知道合适的替代方案吗

问候


迈克尔

这是你真正的问题吗?由于查询中的语法错误,您可能还有其他异常(如果这不是您的实际查询,请编辑您的问题并包含有效的可测试代码)。它应该类似于
从FOO t中选择t,其中t.country in:country
如果
country
FOO
的属性。好,我更正了问题中的查询,查询中没有其他语法错误