between not working JPA.
Modal class:
public class Record extends AbstractTimestampEntity{
string id;
string senderId;
string reciverId;
string status;
@Column(name = "txn_Date", columnDefinition = "DATE")
Date txnDate;
}
JPA Query:
findByTxnDateBetweenAndSenderIdOrReciverIdAndStatus(Date from,Date to,String serderId,String reciverId,String status);
even I am sending from and to date filter not applying in thw query.
I tried same in mysql query here is the Query
select * from record where txn_date between "2020-01-09" and "2020-05-09" and sender_id = "98bd543e-942d-4725-b9bc-32c99eb089ae" or reciver_id = "98bd543e-942d-4725-b9bc-32c99eb089ae" and status = "COMPLETED";
here I am getting expected result.but in JPA not getting