Bonjour, j'ai un probleme
1 2 3 4 5 6 7 8
|
<property name="Chemin" type="String" formula="(case when (NIVEAU_PARENT_FK IS null) then
ID
else
(case when ((select __niveau.NIVEAU_PARENT_FK from NIVEAU as __niveau where __niveau.id=NIVEAU_PARENT_FK) is null)
then (select (cast(ID as VARCHAR(10)) + cast(NIVEAU_PARENT_FK as VARCHAR(10)))) else (select (cast(ID as VARCHAR(10)) + cast(NIVEAU_PARENT_FK as VARCHAR(10)) + cast(__niveau.NIVEAU_PARENT_FK as VARCHAR(10))) from NIVEAU as __niveau where __niveau.id=NIVEAU_PARENT_FK) end)
end)" /> |
le code est bon cepandant je voudrais faire
(select (cast(ID as VARCHAR(10)) + '-' +cast(NIVEAU_PARENT_FK as VARCHAR(10))))
au lieu de
(select (cast(ID as VARCHAR(10)) + cast(NIVEAU_PARENT_FK as VARCHAR(10))))
mais cela me retourne "Failded to lazily initialise a collection"
j'ai essayé
(select (cast(ID as VARCHAR(10)) + (cast('-'as VARCHAR(10)) +cast(NIVEAU_PARENT_FK as VARCHAR(10))))
mais j'ai la même erreur
Config nhibernate : MsSql2005Dialect
Un peu d'aide. SVP...
Partager