我正在尝试从Mongodb的存储库中查询所有记录。使用JPQL查询,但它给出了我下面列出的错误。因为我有很多关系。
尝试过
String query = "select g From AnalyticsGoal g JOIN g.analyticsMethods";
List<AnalyticsGoal> analyticsGoals = em.createQuery(query, AnalyticsGoal.class).getResultList();
public List<AnalyticsGoal> getAllAnalyticsGoals() {
String query = "select g From AnalyticsGoal g JOIN g.analyticsMethods";
List<AnalyticsGoal> analyticsGoals = em.createQuery(query, AnalyticsGoal.class).getResultList();
return analyticsGoals;
}
错误
org.hibernate.HibernateException: Unknown wrap conversion requested: java.lang.String to java.lang.String