It will be simple, but I can not figure out how to fix it. I want to select all records when query parameter "empresaId" is NULL not like now no record is selected. That is when "empresaId" is null is as if there were such a condition.
@Query("select paquete from Paquete paquete where paquete.empresa.id =:empresaId")
Page<Paquete> advancedSearch(@Param("empresaId") Long empresaId, Pageable pageable);
Can somebody help me. Thank you very much.