You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Datta Saru (JIRA)" <ib...@incubator.apache.org> on 2006/09/05 08:41:24 UTC
[jira] Created: (IBATIS-342) Dynamic mapped
statements......exceptions: Element "sqlMap" does not allow text.
Dynamic mapped statements......exceptions: Element "sqlMap" does not allow text.
--------------------------------------------------------------------------------
Key: IBATIS-342
URL: http://issues.apache.org/jira/browse/IBATIS-342
Project: iBatis for Java
Issue Type: Task
Components: SQL Maps
Environment: WindowsXP,Myeclipse5.0,ibatis-common-2.jar,ibatis-dao-2.jar,ibatis-sqlmap-1-x.jar,ibatis-sqlmap-2.jar and Datbase as SAPDB
Reporter: Datta Saru
Attachments: errors.txt
Hi all,
I want to use Dynamic sqlmaps in my application, what jars i need to add to my classpath? This is my Employee.xml:
<resultMap id="get-emp-result" class="src.Employee">
<result property="empNo" column="empno"/>
<result property="empName" column="empname"/>
<result property="deptNo" column="deptno"/>
<result property="dName" column="dname"/>
</resultMap>
<select id="getEmployee" resultMap="get-emp-result">
SELECT * FROM myibatisemp
<dynamic prepend="WHERE">
<isNotEmpty property="empNo">
empno = #empNo#
</isNotEmpty>
</dynamic>
</select>
and this is corresponding java code:
String empNo = "4";
Employee emp =
(Employee)sqlMap.executeQueryForObject(
"getEmployee",empNo);
System.out.println("Employee No = " + emp.getEmpNo());
System.out.println("Dept Name = " + emp.getDName());
System.out.println("Dept No = " + emp.getDeptNo());
System.out.println("EmpName = " + emp.getEmpName());
Plz suggest me some good tutorials on Dynamic sqlmaps with examples. The errors are attached
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] Created: (IBATIS-342) Dynamic mapped statements......exceptions: Element "sqlMap" does not allow text.
Posted by Larry Meadors <lm...@apache.org>.
I deleted this issue (as well as IBATIS-341).
JIRA is not a support forum: Do not use it as a way to get help with
issues in your code unless you are sure that the issue is because of a
bug in iBATIS.
Larry
On 9/5/06, Datta Saru (JIRA) <ib...@incubator.apache.org> wrote:
> Dynamic mapped statements......exceptions: Element "sqlMap" does not allow text.
> --------------------------------------------------------------------------------
>
> Key: IBATIS-342
> URL: http://issues.apache.org/jira/browse/IBATIS-342
> Project: iBatis for Java
> Issue Type: Task
> Components: SQL Maps
> Environment: WindowsXP,Myeclipse5.0,ibatis-common-2.jar,ibatis-dao-2.jar,ibatis-sqlmap-1-x.jar,ibatis-sqlmap-2.jar and Datbase as SAPDB
> Reporter: Datta Saru
> Attachments: errors.txt
>
> Hi all,
> I want to use Dynamic sqlmaps in my application, what jars i need to add to my classpath? This is my Employee.xml:
> <resultMap id="get-emp-result" class="src.Employee">
> <result property="empNo" column="empno"/>
> <result property="empName" column="empname"/>
> <result property="deptNo" column="deptno"/>
> <result property="dName" column="dname"/>
> </resultMap>
> <select id="getEmployee" resultMap="get-emp-result">
> SELECT * FROM myibatisemp
> <dynamic prepend="WHERE">
> <isNotEmpty property="empNo">
> empno = #empNo#
> </isNotEmpty>
> </dynamic>
> </select>
> and this is corresponding java code:
> String empNo = "4";
> Employee emp =
> (Employee)sqlMap.executeQueryForObject(
> "getEmployee",empNo);
> System.out.println("Employee No = " + emp.getEmpNo());
> System.out.println("Dept Name = " + emp.getDName());
> System.out.println("Dept No = " + emp.getDeptNo());
> System.out.println("EmpName = " + emp.getEmpName());
> Plz suggest me some good tutorials on Dynamic sqlmaps with examples. The errors are attached
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>