-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlExceptionHelper : No value specified for parameter 2 #86
Comments
Hi! The I won't have time to take a look at it in the next few days, but I'll happily merge your fix if you find something 👍 |
Thank you very much for your answer, Damien |
Hello Damien Do you plan to implement this functionality in the future? |
1 similar comment
Hello Damien Do you plan to implement this functionality in the future? |
@ximBalaguer no, I don't plan to implement it myself for now, as it is quite an uncommon use case. But as I said, if someone wants to implement it, I'll merge it 👍 |
Congratulations for your work. It's great.
I have a problem if I create a formula (@formula) with parameters.
In datatables, if I filter by the field linked to that formula, I get the following error:
Hibernate:
select
tercero0_.id as id1_3_,
tercero0_.apellidos as apellido2_3_,
tercero0_.fechaNacimiento as fechaNac3_3_,
tercero0_.nombre as nombre4_3_,
tercero0_.observaciones as observac5_3_,
tercero0_.persona as persona6_3_,
tercero0_.profesion as profesio7_3_,
tercero0_.salario as salario8_3_,
tercero0_.situacionId as situacio9_3_,
(SELECT
GROUP_CONCAT(TD.denominacion)
FROM
tr_tercerosDirecc TD
WHERE
TD.terceroId = tercero0_.id) as formula232_,
year(curdate())-year(tercero0_.fechaNacimiento) as formula233_
from
tr_terceros tercero0_
left outer join
tb_nodos nodo1_
on tercero0_.situacionId=nodo1_.id
order by
(SELECT
TD.denominacion
FROM
tb_nodosTraducs TD
WHERE
TD.nodoId = nodo1_.id
and TD.idiomaId = ?) asc limit ?
2018-09-21 08:38:35.309 WARN 7541 --- [nio-8081-exec-4] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 07001
2018-09-21 08:38:35.309 ERROR 7541 --- [nio-8081-exec-4] o.h.engine.jdbc.spi.SqlExceptionHelper : No value specified for parameter 2
retornar=DataTablesOutput(draw=2, recordsTotal=20, recordsFiltered=0, data=[], error=javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet)
CONTROLLER
@JSONVIEW(DataTablesOutput.View.class)
@RequestMapping(value = "/findPaginados", method = RequestMethod.POST )
public @responsebody DataTablesOutput getTercerosPaginados(@Valid DataTablesInput input) {
Session session = (Session) entityManager.unwrap(Session.class);
session.enableFilter("filtroPorIdioma").setParameter("parIdioma", 12);
DataTablesOutput retornar = agenda.findAll(input);
return retornar;
}
MODEL*
The text was updated successfully, but these errors were encountered: