You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Sebastien Lucas <se...@gmail.com> on 2005/06/29 10:01:58 UTC
Still me ;) : Error in a sqlmap (generate ???)
Hi,
Still me ;)
Thanks to Pablo the log is enabled and I catch ALL the messages.
I created a SqlMal :
<?xml version="1.0" encoding="utf-8" ?>
<sqlMap
namespace="LigneCommande"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="SqlMap.xsd">
<!-- XML "behind" document for the People service class. -->
<alias>
<typeAlias alias="LigneCommande" type="TestIBatis.LigneCommande" />
</alias>
<resultMaps>
<resultMap id="LigneCommandeResult" class="LigneCommande" >
<result property="Engagement" column="NUMENGA" />
<result property="Ligne" column="NUMLIGNE" />
</resultMap>
</resultMaps>
<statements>
<delete id="LigneCommandeDelete" parameterClass="LigneCommande">
delete from IF_LIGNE_COM
where NUMENGA = #Engagement# AND NUMLIGNE = #Ligne#
</delete>
<select id="LigneCommandeSelect" parameterClass="LigneCommande"
resultMap="LigneCommandeResult" >
<generate table="IF_LIGNE_COM" by="Engagement" />
</select>
</statements>
</sqlMap>
My goal was to test the generate tag. I got the following error :
- The error occurred while loading SqlMap .
- loading select tag
- The error occurred in <sqlMap
resource="${root}Ressources\LigneCommandeHelper.xml" />.
- Check the LigneCommandeSelect.
When I replace the generate tag with a proper select then my test
program works fine.
I checked the log but I got nothing in there (I expected to have more
explanation in it).
Thanks in advance for your help.
Sébastien
Re: Still me ;) : Error in a sqlmap (generate ???)
Posted by Sebastien Lucas <se...@gmail.com>.
I guess I'll have to understand the difference between parameterMap
and resultMap then ... :P
Thanks for your answer.
On 6/29/05, Gilles Bayon <ib...@gmail.com> wrote:
> <generate table="IF_LIGNE_COM" by="NUMENGA" /> perhaps ?
> and for a generate tag the statement tag require a paramaterMap attribut as
>
>
>
> <select id="SelectByPKCategoryGenerate" resultClass="Category"
> parameterClass ="Category" parameterMap="select-generate-params">
>
> <generate table="Categories" by="Category_Id"/>
>
> </select>
>
>
>
> On 6/29/05, Sebastien Lucas <se...@gmail.com> wrote:
> > Hi,
> >
> > Still me ;)
> >
> > Thanks to Pablo the log is enabled and I catch ALL the messages.
> >
> > I created a SqlMal :
> >
> > <?xml version="1.0" encoding="utf-8" ?>
> >
> > <sqlMap
> > namespace="LigneCommande"
> >
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> > xsi:noNamespaceSchemaLocation="SqlMap.xsd">
> >
> > <!-- XML "behind" document for the People service class. -->
> >
> > <alias>
> > <typeAlias alias="LigneCommande" type="
> TestIBatis.LigneCommande" />
> > </alias>
> >
> > <resultMaps>
> > <resultMap id="LigneCommandeResult" class="LigneCommande" >
> > <result property="Engagement" column="NUMENGA" />
> > <result property="Ligne" column="NUMLIGNE" />
> > </resultMap>
> > </resultMaps>
> >
> > <statements>
> > <delete id="LigneCommandeDelete"
> parameterClass="LigneCommande">
> > delete from IF_LIGNE_COM
> > where NUMENGA = #Engagement# AND NUMLIGNE = #Ligne#
> > </delete>
> > <select id="LigneCommandeSelect"
> parameterClass="LigneCommande"
> > resultMap="LigneCommandeResult" >
> > <generate table="IF_LIGNE_COM" by="Engagement" />
> > </select>
> > </statements>
> >
> > </sqlMap>
> >
> >
> > My goal was to test the generate tag. I got the following error :
> >
> > - The error occurred while loading SqlMap .
> > - loading select tag
> > - The error occurred in <sqlMap
> > resource="${root}Ressources\LigneCommandeHelper.xml" />.
> > - Check the LigneCommandeSelect.
> >
> > When I replace the generate tag with a proper select then my test
> > program works fine.
> >
> > I checked the log but I got nothing in there (I expected to have more
> > explanation in it).
> >
> > Thanks in advance for your help.
> >
> > Sébastien
> >
>
>
Re: Still me ;) : Error in a sqlmap (generate ???)
Posted by Gilles Bayon <ib...@gmail.com>.
<generate table="IF_LIGNE_COM" by="*NUMENGA*" /> perhaps ?
and for a generate tag the statement tag require a paramaterMap attribut as
<select id="SelectByPKCategoryGenerate" resultClass="Category"
parameterClass="Category" parameterMap="select-generate-params">
<generate table="Categories" by="Category_Id"/>
</select>
On 6/29/05, Sebastien Lucas <se...@gmail.com> wrote:
>
> Hi,
>
> Still me ;)
>
> Thanks to Pablo the log is enabled and I catch ALL the messages.
>
> I created a SqlMal :
>
> <?xml version="1.0" encoding="utf-8" ?>
>
> <sqlMap
> namespace="LigneCommande"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="SqlMap.xsd">
>
> <!-- XML "behind" document for the People service class. -->
>
> <alias>
> <typeAlias alias="LigneCommande" type="TestIBatis.LigneCommande" />
> </alias>
>
> <resultMaps>
> <resultMap id="LigneCommandeResult" class="LigneCommande" >
> <result property="Engagement" column="NUMENGA" />
> <result property="Ligne" column="NUMLIGNE" />
> </resultMap>
> </resultMaps>
>
> <statements>
> <delete id="LigneCommandeDelete" parameterClass="LigneCommande">
> delete from IF_LIGNE_COM
> where NUMENGA = #Engagement# AND NUMLIGNE = #Ligne#
> </delete>
> <select id="LigneCommandeSelect" parameterClass="LigneCommande"
> resultMap="LigneCommandeResult" >
> <generate table="IF_LIGNE_COM" by="Engagement" />
> </select>
> </statements>
>
> </sqlMap>
>
>
> My goal was to test the generate tag. I got the following error :
>
> - The error occurred while loading SqlMap .
> - loading select tag
> - The error occurred in <sqlMap
> resource="${root}Ressources\LigneCommandeHelper.xml" />.
> - Check the LigneCommandeSelect.
>
> When I replace the generate tag with a proper select then my test
> program works fine.
>
> I checked the log but I got nothing in there (I expected to have more
> explanation in it).
>
> Thanks in advance for your help.
>
> Sébastien
>