I'm using spring boot 1.5.7 with ibatis 1.3.1. I have several test classes that work, but when I use "with as" the sql I have an error. It says that the table does not exist, as if it were a normal table. I run the tests for Intellij and everything works fine, but when I use maven it gives the error. My code:
WITH numeros_licitacao AS (
SELECT l.id, l.datacriacao, l.numerocertidao, l.numeropublicacao,
l.numeroviproc, l.numtermoparticipacao, l.numeroedoweb, puo.sigla
FROM s2gpr_compras_licitacao.licitacao l
JOIN s2gpr_compras_licitacao.unidade_compras uc ON l.promotorlicitacao_id = uc.id
JOIN s2gpr_corporativo_rh.unidade_organizacional uo ON uc.promotorlicitacao_id = uo.id
JOIN s2gpr_corporativo_rh.perfil_unidade_organizacional puo ON puo.id_unidade_organizacional = uo.id
WHERE l.id = #{idLicitacao}
) SELECT n.ci_numero_processo ...
when I remove the "WITH AS" it works.
Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException: not found: NUMEROS_LICITACAO"; SQL statement:
Aucun commentaire:
Enregistrer un commentaire