estoy haciendo una funcion en postgresql con spring boot y me devuelve este error:
"error": "No Dialect mapping for JDBC type: 1111; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111: No Dialect mapping for JDBC type: 1111"
este es la funcion:
create or replace function eliminar_fechastomadas(id_res numeric,id_hrs numeric,fd Date) returns void as $$
begin
DELETE FROM public.reserva_hora
WHERE reserva_id=id_res and fecha_dia=fd and hora_id=id_hrs;
end;
$$ language plpgsql;
esta es donde llamo la query en spring boot:
@Modifying
@Query(value= "select eliminar_fechastomadas(?1,?2,?3)",nativeQuery = true )
public List<Object> eliminar_fechastomadas(Long id_res,Long id_hrs,Date fd);
public List<Object> eliminar_fechastomadas(String id_res,String id_hrs,Date fd);
@Override
public List<Object> eliminar_fechastomadas(String id_res,String id_hrs,Date fd) {
long id=Long.parseLong(id_res);
long id2=Long.parseLong(id_hrs);
return reservaDao.eliminar_fechastomadas(id,id2,fd);
}
Y esto es el controller:
@GetMapping("/reservahoras/reservahoradia/{id_res}/{id_hrs}/{fd}")
public ResponseEntity<?> eliminar_fechastomadas(@PathVariable String id_res,@PathVariable String id_hrs,@PathVariable String fd) throws ParseException {
Map<String, Object> response = new HashMap<>();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM-yyyy");
Date date = simpleDateFormat.parse(fd);
List<Object> reservahora = null;
try {
reservahora = reservaService.eliminar_fechastomadas(id_res,id_hrs,date);
} catch (DataAccessException e) {
response.put("mensaje", "Error al ejecutar procedimiento almacenado en la base de datos");
response.put("error", e.getMessage().concat(": ").concat(e.getMostSpecificCause().getMessage()));
return new ResponseEntity<Map<String, Object>>(response, HttpStatus.NOT_FOUND);
}
return new ResponseEntity <List<Object>>(reservahora, HttpStatus.OK);
}