我是 kundera mongoDb 的新手,我的问题是当我尝试使用本机查询获取数据时出现以下错误
Exception in thread "main" com.impetus.kundera.query.QueryHandlerException: java.lang.UnsupportedOperationException: Native query support is not enabled in mongoDB
at com.impetus.client.mongodb.query.MongoDBQuery.populateEntities(MongoDBQuery.java:172)
at com.impetus.kundera.query.QueryImpl.fetch(QueryImpl.java:986)
at com.impetus.kundera.query.QueryImpl.getResultList(QueryImpl.java:163)
at com.test.Test2.main(Test2.java:80)
我的代码如下
EntityManagerFactory emf = Persistence
.createEntityManagerFactory("mango");
EntityManager em = emf.createEntityManager();
Query query = em.createNativeQuery("db.resturant.find({contact: {\"$elemMatch\" : {\"Mobile\" : \"9568256549\"}}})");
query.getResultList();
帮我...