我在下面展示了这个查询,我只想检索一些由属性名过滤掉的tproducts(比如哪个是活动的,哪个不是布尔值),我该怎么做呢?有人能帮忙吗?
value = "SELECT DISTINCT(t) FROM Trfi t " +
"LEFT JOIN FETCH t.trfiProductCollection tProducts " +
"LEFT JOIN FETCH tProducts.productModel pModel " +
"LEFT JOIN FETCH t.trfiPaymentCollection tPayment " +
"WHERE t.sedId IN (:sessionIds) ",
countQuery = "SELECT COUNT (DISTINCT t) FROM Trfi t " +
"JOIN t.trfiProductCollection tProducts " +
"JOIN tProducts.productModel pModel " +
"JOIN pModel.provider provider " +
"JOIN t.trfiPaymentCollection tPayment " +
"WHERE t.sedId IN (:sessionIds) "
)
List<Trfi> getTrfiListBySessionsId(@Param("sessionIds") List<Integer> sessionIds);
1条答案
按热度按时间mefy6pfw1#
这对你不管用吗?