我有以下类结构:
class TransactionRelation{
Transaction req;
Transaction resp;
....
}
class Transaction{
Long id;
private Set<TransactionStateHistory> transactionStateHistory;
...
}
public class TransactionStateHistory {
private Long id;
private TransactionState transactionState;
}
我需要从req
查询TransactionRelation
的交易,
结果中的每个交易都应为TransactionStateHistory
,类型为type1
和相应的响应事务不应该具有TransactionStateHistory with type
type2`
JPQL如何建议解决以下任务?
本主题围绕我的主题,但我有点复杂
JPA JPQL: select items when attribute of item (list/set) contains another item
我需要写这样的东西:
SELECT d FROM Document AS d WHERE: user MEMBER OF d.accessors.attribute