|
Hi
Can someone tell me why this fails validation with the following error: line: 7:89 Attribute "before" must be declared for element type "selectKey". <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="TaskDAO"> <insert id="addTaskUpdate" parameterType="UpdateCommand"> <selectKey resultType="int" before="true" keyProperty="id" statementType="PREPARED"> SELECT seq_wkfl_taskupdate_id.NEXTVAL AS VALUE FROM DUAL </selectKey> INSERT INTO WKFL_TASKUPDATE (ID, TASKID, EXECUTED, EXECUTORID, TASKUPDATETYPE) VALUES (#{id}, #{task.id}, #{executionTime}, #{executor.id}, #{type}) </insert> </mapper> Thanks Andreas |
|
Turns out that the guide is wrong.
It should be order="BEFORE" Can you please change it? Thanks Andreas On 20 Feb 2012, at 12:37, Andreas Markitanis wrote: > Hi > > Can someone tell me why this fails validation with the following error: > > line: 7:89 Attribute "before" must be declared for element type "selectKey". > > > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> > > <mapper namespace="TaskDAO"> > > > <insert id="addTaskUpdate" parameterType="UpdateCommand"> > <selectKey resultType="int" before="true" keyProperty="id" statementType="PREPARED"> > SELECT seq_wkfl_taskupdate_id.NEXTVAL AS VALUE FROM DUAL > </selectKey> > INSERT INTO WKFL_TASKUPDATE (ID, TASKID, EXECUTED, EXECUTORID, TASKUPDATETYPE) > VALUES (#{id}, #{task.id}, #{executionTime}, #{executor.id}, #{type}) > </insert> > </mapper> > > Thanks > Andreas > |
|
I cannot find that. Is it right in the new guide?
http://www.mybatis.org/core/sqlmap-xml.html 2012/2/20 Andreas Markitanis <[hidden email]>: > Turns out that the guide is wrong. > > It should be order="BEFORE" > > Can you please change it? > > Thanks > Andreas > On 20 Feb 2012, at 12:37, Andreas Markitanis wrote: > >> Hi >> >> Can someone tell me why this fails validation with the following error: >> >> line: 7:89 Attribute "before" must be declared for element type "selectKey". >> >> >> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> >> >> <mapper namespace="TaskDAO"> >> >> >> <insert id="addTaskUpdate" parameterType="UpdateCommand"> >> <selectKey resultType="int" before="true" keyProperty="id" statementType="PREPARED"> >> SELECT seq_wkfl_taskupdate_id.NEXTVAL AS VALUE FROM DUAL >> </selectKey> >> INSERT INTO WKFL_TASKUPDATE (ID, TASKID, EXECUTED, EXECUTORID, TASKUPDATETYPE) >> VALUES (#{id}, #{task.id}, #{executionTime}, #{executor.id}, #{type}) >> </insert> >> </mapper> >> >> Thanks >> Andreas >> > |
|
I was looking in the Mybatis-3-User-Guide.pdf
On 20 Feb 2012, at 13:38, Eduardo Macarron wrote: > I cannot find that. Is it right in the new guide? > > http://www.mybatis.org/core/sqlmap-xml.html > > > 2012/2/20 Andreas Markitanis <[hidden email]>: >> Turns out that the guide is wrong. >> >> It should be order="BEFORE" >> >> Can you please change it? >> >> Thanks >> Andreas >> On 20 Feb 2012, at 12:37, Andreas Markitanis wrote: >> >>> Hi >>> >>> Can someone tell me why this fails validation with the following error: >>> >>> line: 7:89 Attribute "before" must be declared for element type "selectKey". >>> >>> >>> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> >>> >>> <mapper namespace="TaskDAO"> >>> >>> >>> <insert id="addTaskUpdate" parameterType="UpdateCommand"> >>> <selectKey resultType="int" before="true" keyProperty="id" statementType="PREPARED"> >>> SELECT seq_wkfl_taskupdate_id.NEXTVAL AS VALUE FROM DUAL >>> </selectKey> >>> INSERT INTO WKFL_TASKUPDATE (ID, TASKID, EXECUTED, EXECUTORID, TASKUPDATETYPE) >>> VALUES (#{id}, #{task.id}, #{executionTime}, #{executor.id}, #{type}) >>> </insert> >>> </mapper> >>> >>> Thanks >>> Andreas >>> >> |
|
Ok Andreas. Looks that someone fixed that already. Thanks anyway for
the note! On 20 feb, 14:40, Andreas Markitanis <[hidden email]> wrote: > I was looking in the Mybatis-3-User-Guide.pdf > > On 20 Feb 2012, at 13:38, Eduardo Macarron wrote: > > > > > > > > > I cannot find that. Is it right in the new guide? > > >http://www.mybatis.org/core/sqlmap-xml.html > > > 2012/2/20 Andreas Markitanis <[hidden email]>: > >> Turns out that the guide is wrong. > > >> It should be order="BEFORE" > > >> Can you please change it? > > >> Thanks > >> Andreas > >> On 20 Feb 2012, at 12:37, Andreas Markitanis wrote: > > >>> Hi > > >>> Can someone tell me why this fails validation with the following error: > > >>> line: 7:89 Attribute "before" must be declared for element type "selectKey". > > >>> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> > > >>> <mapper namespace="TaskDAO"> > > >>> <insert id="addTaskUpdate" parameterType="UpdateCommand"> > >>> <selectKey resultType="int" before="true" keyProperty="id" statementType="PREPARED"> > >>> SELECT seq_wkfl_taskupdate_id.NEXTVAL AS VALUE FROM DUAL > >>> </selectKey> > >>> INSERT INTO WKFL_TASKUPDATE (ID, TASKID, EXECUTED, EXECUTORID, TASKUPDATETYPE) > >>> VALUES (#{id}, #{task.id}, #{executionTime}, #{executor.id}, #{type}) > >>> </insert> > >>> </mapper> > > >>> Thanks > >>> Andreas |
| Powered by Nabble | Edit this page |
