relationships are not needed for that query

This commit is contained in:
Athou
2013-07-30 21:12:52 +02:00
parent 8ec9705dd6
commit 43a0c7be81

View File

@@ -45,9 +45,8 @@ public class FeedSubscriptionDAO extends GenericDAO<FeedSubscription> {
CriteriaQuery<FeedSubscription> query = builder.createQuery(getType());
Root<FeedSubscription> root = query.from(getType());
query.where(builder.equal(root.get(FeedSubscription_.feed).get(Feed_.id), feed.getId()));
query.where(builder.equal(root.get(FeedSubscription_.feed), feed));
List<FeedSubscription> list = cache(em.createQuery(query)).getResultList();
initRelations(list);
return list;
}