0
I’m trying to make a query using JPA criteria, it would be as follows:
I will pass 2 Start date and a Final Date and a vehicle plate how can I make this query?
NOTE: The table that I will consult would be Servico and it has a Car where this car would have a plate, I believe that up to this point is correct.
public List<Servico> buscarServicoDeVeiculoEntreDatas(Date diaServico, Date diaGarantia, Carro carro) {
CriteriaBuilder builder = manager.getCriteriaBuilder();
CriteriaQuery<Servico> criteriaQuery = builder.createQuery(Servico.class);
Root<Servico> s = criteriaQuery.from(Servico.class);
criteriaQuery.select(s);
in this setTime method what I put in the parameter? NOTE: I want to search by date and not by Time.
– user67378