I have the following class structure:
class TransactionRelation{
Transaction req;
Transaction resp;
....
}
class Transaction{
Long id;
private Set<TransactionStateHistory> transactionStateHistory;
...
}
public class TransactionStateHistory {
private Long id;
private TransactionState transactionState;
}
I need to query transactions who is req
from TransactionRelation
,
each transaction from result should has TransactionStateHistory
with type type1
and corresponding response transaction should not have TransactionStateHistorywith type
type2`
How does JPQL suggest to resolve the following task?
This topic goes around my topic but my a bit more complicated
JPA JPQL: select items when attribute of item (list/set) contains another item
I need to write something like this:
SELECT d FROM Document AS d WHERE: user MEMBER OF d.accessors.attribute