how to embed part of query dynamically to a select element in Ibatis 3

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

how to embed part of query dynamically to a select element in Ibatis 3

radha
I have a requirement where part of query need to be passed to a select elemet like below. If you see below I will construct the whereclause and pass to this select.Below statement worked in iBats2.
 

<

select id="getWPIData" parameterType="java.lang.String" resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >

select * from table $whereClause$

</select>

 

Can anyone suggest how to do in iBatis3.

Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
I want to clarify one thing here. Even though I said dynamic in the subject, it is not a dynamic query. It is a simple select , but having different where clause at runtime based on request.

On Wed, Oct 6, 2010 at 12:56 PM, radha <[hidden email]> wrote:
I have a requirement where part of query need to be passed to a select elemet like below. If you see below I will construct the whereclause and pass to this select.Below statement worked in iBats2.
 

<

select id="getWPIData" parameterType="java.lang.String" resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >

select * from table $whereClause$

</select>

 

Can anyone suggest how to do in iBatis3.


Reply | Threaded
Open this post in threaded view
|

RE: how to embed part of query dynamically to a select element in Ibatis 3

Brian Barnett

From page 28 of docs:

 

String Substitution

By default, using the #{} syntax will cause MyBatis to generate PreparedStatement properties and set

the values safely against the PreparedStatement parameters (e.g. ?). While this is safer, faster and

almost always preferred, sometimes you just want to directly inject a string unmodified into the SQL

Statement. For example, for ORDER BY, you might use something like this:

ORDER BY ${columnName}

Here MyBatis won’t modify or escape the string.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 2:24 PM
To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I want to clarify one thing here. Even though I said dynamic in the subject, it is not a dynamic query. It is a simple select , but having different where clause at runtime based on request.

On Wed, Oct 6, 2010 at 12:56 PM, radha <[hidden email]> wrote:

I have a requirement where part of query need to be passed to a select elemet like below. If you see below I will construct the whereclause and pass to this select.Below statement worked in iBats2.

 

< 

select id="getWPIData" parameterType="java.lang.String" resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >

select * from table $whereClause$

</select>

 

Can anyone suggest how to do in iBatis3.

 

Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
I tried #{} and ${}. Both did not work.
 
When I use #{} , no errors , but simply does not return any rows.
 
when I use ${} I am getting below error.
 
### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause' in 'class java.lang.String'
### The error may exist in com/boeing/siai/pmws/mapping/PmwsSqlMap.xml
### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData
### The error occurred while executing a query
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause'  in 'class java.lang.String'


On Wed, Oct 6, 2010 at 2:45 PM, Brian Barnett <[hidden email]> wrote:

From page 28 of docs:

 

String Substitution

By default, using the #{} syntax will cause MyBatis to generate PreparedStatement properties and set

the values safely against the PreparedStatement parameters (e.g. ?). While this is safer, faster and

almost always preferred, sometimes you just want to directly inject a string unmodified into the SQL

Statement. For example, for ORDER BY, you might use something like this:

ORDER BY ${columnName}

Here MyBatis won’t modify or escape the string.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 2:24 PM
To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I want to clarify one thing here. Even though I said dynamic in the subject, it is not a dynamic query. It is a simple select , but having different where clause at runtime based on request.

On Wed, Oct 6, 2010 at 12:56 PM, radha <[hidden email]> wrote:

I have a requirement where part of query need to be passed to a select elemet like below. If you see below I will construct the whereclause and pass to this select.Below statement worked in iBats2.

 

select id="getWPIData" parameterType="java.lang.String" resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >

select * from table $whereClause$

</select>

 

Can anyone suggest how to do in iBatis3.

 


Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
I was wrong about #{}. When I use this option I am getting below exception.
 

R

org.apache.ibatis.exceptions.IbatisException:

### Error querying database. Cause:

java.sql.SQLException: ORA-00920: invalid relational operator

### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData-Inline

### The error occurred while setting parameters

### Cause:

java.sql.SQLException: ORA-00920: invalid relational operator

 
On Wed, Oct 6, 2010 at 3:36 PM, radha <[hidden email]> wrote:
I tried #{} and ${}. Both did not work.
 
When I use #{} , no errors , but simply does not return any rows.
 
when I use ${} I am getting below error.
 
### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause' in 'class java.lang.String'
### The error may exist in com/boeing/siai/pmws/mapping/PmwsSqlMap.xml
### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData
### The error occurred while executing a query
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause'  in 'class java.lang.String'


On Wed, Oct 6, 2010 at 2:45 PM, Brian Barnett <[hidden email]> wrote:

From page 28 of docs:

 

String Substitution

By default, using the #{} syntax will cause MyBatis to generate PreparedStatement properties and set

the values safely against the PreparedStatement parameters (e.g. ?). While this is safer, faster and

almost always preferred, sometimes you just want to directly inject a string unmodified into the SQL

Statement. For example, for ORDER BY, you might use something like this:

ORDER BY ${columnName}

Here MyBatis won’t modify or escape the string.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 2:24 PM
To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I want to clarify one thing here. Even though I said dynamic in the subject, it is not a dynamic query. It is a simple select , but having different where clause at runtime based on request.

On Wed, Oct 6, 2010 at 12:56 PM, radha <[hidden email]> wrote:

I have a requirement where part of query need to be passed to a select elemet like below. If you see below I will construct the whereclause and pass to this select.Below statement worked in iBats2.

 

select id="getWPIData" parameterType="java.lang.String" resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >

select * from table $whereClause$

</select>

 

Can anyone suggest how to do in iBatis3.

 



Reply | Threaded
Open this post in threaded view
|

RE: how to embed part of query dynamically to a select element in Ibatis 3

Brian Barnett

Not sure if this is the problem, but in your original example, you have both resultType and resultMap. Page 23 of docs indicate that you should use one or the other, not both.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 5:01 PM
To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I was wrong about #{}. When I use this option I am getting below exception.

 

R

org.apache.ibatis.exceptions.IbatisException:

### Error querying database. Cause:

java.sql.SQLException: ORA-00920: invalid relational operator

### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData-Inline

### The error occurred while setting parameters

### Cause:

java.sql.SQLException: ORA-00920: invalid relational operator

 

On Wed, Oct 6, 2010 at 3:36 PM, radha <[hidden email]> wrote:

I tried #{} and ${}. Both did not work.

 

When I use #{} , no errors , but simply does not return any rows.

 

when I use ${} I am getting below error.

 

### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause' in 'class java.lang.String'
### The error may exist in com/boeing/siai/pmws/mapping/PmwsSqlMap.xml
### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData
### The error occurred while executing a query
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause'  in 'class java.lang.String'

On Wed, Oct 6, 2010 at 2:45 PM, Brian Barnett <[hidden email]> wrote:

From page 28 of docs:

 

String Substitution

By default, using the #{} syntax will cause MyBatis to generate PreparedStatement properties and set

the values safely against the PreparedStatement parameters (e.g. ?). While this is safer, faster and

almost always preferred, sometimes you just want to directly inject a string unmodified into the SQL

Statement. For example, for ORDER BY, you might use something like this:

ORDER BY ${columnName}

Here MyBatis won’t modify or escape the string.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 2:24 PM
To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I want to clarify one thing here. Even though I said dynamic in the subject, it is not a dynamic query. It is a simple select , but having different where clause at runtime based on request.

On Wed, Oct 6, 2010 at 12:56 PM, radha <[hidden email]> wrote:

I have a requirement where part of query need to be passed to a select elemet like below. If you see below I will construct the whereclause and pass to this select.Below statement worked in iBats2.

 

select id="getWPIData" parameterType="java.lang.String" resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >

select * from table $whereClause$

</select>

 

Can anyone suggest how to do in iBatis3.

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
I tried using each one , instead of both, but still same issue.

On Wed, Oct 6, 2010 at 4:04 PM, Brian Barnett <[hidden email]> wrote:

Not sure if this is the problem, but in your original example, you have both resultType and resultMap. Page 23 of docs indicate that you should use one or the other, not both.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 5:01 PM


To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I was wrong about #{}. When I use this option I am getting below exception.

 

R

org.apache.ibatis.exceptions.IbatisException:

### Error querying database. Cause:

java.sql.SQLException: ORA-00920: invalid relational operator

### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData-Inline

### The error occurred while setting parameters

### Cause:

java.sql.SQLException: ORA-00920: invalid relational operator

 

On Wed, Oct 6, 2010 at 3:36 PM, radha <[hidden email]> wrote:

I tried #{} and ${}. Both did not work.

 

When I use #{} , no errors , but simply does not return any rows.

 

when I use ${} I am getting below error.

 

### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause' in 'class java.lang.String'
### The error may exist in com/boeing/siai/pmws/mapping/PmwsSqlMap.xml
### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData
### The error occurred while executing a query
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause'  in 'class java.lang.String'

On Wed, Oct 6, 2010 at 2:45 PM, Brian Barnett <[hidden email]> wrote:

From page 28 of docs:

 

String Substitution

By default, using the #{} syntax will cause MyBatis to generate PreparedStatement properties and set

the values safely against the PreparedStatement parameters (e.g. ?). While this is safer, faster and

almost always preferred, sometimes you just want to directly inject a string unmodified into the SQL

Statement. For example, for ORDER BY, you might use something like this:

ORDER BY ${columnName}

Here MyBatis won’t modify or escape the string.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 2:24 PM
To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I want to clarify one thing here. Even though I said dynamic in the subject, it is not a dynamic query. It is a simple select , but having different where clause at runtime based on request.

On Wed, Oct 6, 2010 at 12:56 PM, radha <[hidden email]> wrote:

I have a requirement where part of query need to be passed to a select elemet like below. If you see below I will construct the whereclause and pass to this select.Below statement worked in iBats2.

 

select id="getWPIData" parameterType="java.lang.String" resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >

select * from table $whereClause$

</select>

 

Can anyone suggest how to do in iBatis3.

 

 

 


Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
 I posted it as an issue at below link.
 
On Wed, Oct 6, 2010 at 4:34 PM, radha <[hidden email]> wrote:
I tried using each one , instead of both, but still same issue.


On Wed, Oct 6, 2010 at 4:04 PM, Brian Barnett <[hidden email]> wrote:

Not sure if this is the problem, but in your original example, you have both resultType and resultMap. Page 23 of docs indicate that you should use one or the other, not both.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 5:01 PM


To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I was wrong about #{}. When I use this option I am getting below exception.

 

R

org.apache.ibatis.exceptions.IbatisException:

### Error querying database. Cause:

java.sql.SQLException: ORA-00920: invalid relational operator

### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData-Inline

### The error occurred while setting parameters

### Cause:

java.sql.SQLException: ORA-00920: invalid relational operator

 

On Wed, Oct 6, 2010 at 3:36 PM, radha <[hidden email]> wrote:

I tried #{} and ${}. Both did not work.

 

When I use #{} , no errors , but simply does not return any rows.

 

when I use ${} I am getting below error.

 

### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause' in 'class java.lang.String'
### The error may exist in com/boeing/siai/pmws/mapping/PmwsSqlMap.xml
### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData
### The error occurred while executing a query
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'whereClause'  in 'class java.lang.String'

On Wed, Oct 6, 2010 at 2:45 PM, Brian Barnett <[hidden email]> wrote:

From page 28 of docs:

 

String Substitution

By default, using the #{} syntax will cause MyBatis to generate PreparedStatement properties and set

the values safely against the PreparedStatement parameters (e.g. ?). While this is safer, faster and

almost always preferred, sometimes you just want to directly inject a string unmodified into the SQL

Statement. For example, for ORDER BY, you might use something like this:

ORDER BY ${columnName}

Here MyBatis won’t modify or escape the string.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of radha
Sent: Wednesday, October 06, 2010 2:24 PM
To: [hidden email]
Subject: Re: how to embed part of query dynamically to a select element in Ibatis 3

 

I want to clarify one thing here. Even though I said dynamic in the subject, it is not a dynamic query. It is a simple select , but having different where clause at runtime based on request.

On Wed, Oct 6, 2010 at 12:56 PM, radha <[hidden email]> wrote:

I have a requirement where part of query need to be passed to a select elemet like below. If you see below I will construct the whereclause and pass to this select.Below statement worked in iBats2.

 

select id="getWPIData" parameterType="java.lang.String" resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >

select * from table $whereClause$

</select>

 

Can anyone suggest how to do in iBatis3.

 

 

 



Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

AntPort
In reply to this post by radha
Maybe this will help...

        <resultMap id="LanguageMap"
type="hr.abcinfo.domain.abcnew.LanguagePojo">
                <result column="languageId" property="sJezik" jdbcType="VARCHAR" />
                <result column="languageName" property="nJezik" jdbcType="VARCHAR" /
>
        </resultMap>

        <sql id="selectList">
                S_JEZIK AS sJezik,
                N_JEZIK AS nJezik
        </sql>

        <sql id="fromList">
                A_JEZIK a_jezik
        </sql>

        <select id="countLangFilter" parameterType="String" resultType="int"
                useCache="true" flushCache="false">
                SELECT COUNT(*)
                FROM
                <include refid="fromList" />
                ${value}
        </select>

{$value} is dynamic generated part of where sql...

...or like this...

        <select id="selectLangFilter"
parameterType="hr.abcinfo.utility.ibatis.domain.DynamicQueryObject"
                resultType="hr.abcinfo.domain.abcnew.LanguagePojo" useCache="true"
                flushCache="false">
                SELECT
                <include refid="selectList" />
                FROM
                <include refid="fromList" />
                ${whereCondition} ${orderBy}
        </select>

...works fine for us...


On Oct 6, 9:56 pm, radha <[hidden email]> wrote:

> I have a requirement where part of query need to be passed to a select
> elemet like below. If you see below I will construct the whereclause and
> pass to this select.Below statement worked in iBats2.
>
> <select id="getWPIData" parameterType="java.lang.String"
> resultType="WorkPkgInfo"
> resultMap="PMWSFTCSMap" >
>
> select * from table $whereClause$
>
> </select>
>
> Can anyone suggest how to do in iBatis3.
Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

saurabh
In reply to this post by Brian Barnett
for ${} it look for getter methods hence pass the class with veriable
whereClause insted of String

On Oct 7, 4:04 am, "Brian Barnett" <[hidden email]> wrote:

> Not sure if this is the problem, but in your original example, you have both
> resultType and resultMap. Page 23 of docs indicate that you should use one
> or the other, not both.
>
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of radha
> Sent: Wednesday, October 06, 2010 5:01 PM
> To: [hidden email]
> Subject: Re: how to embed part of query dynamically to a select element in
> Ibatis 3
>
> I was wrong about #{}. When I use this option I am getting below exception.
>
> R
>
> org.apache.ibatis.exceptions.IbatisException:
>
> ### Error querying database. Cause:
>
> java.sql.SQLException: ORA-00920: invalid relational operator
>
> ### The error may involve
> com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData-Inline
>
> ### The error occurred while setting parameters
>
> ### Cause:
>
> java.sql.SQLException: ORA-00920: invalid relational operator
>
> On Wed, Oct 6, 2010 at 3:36 PM, radha <[hidden email]> wrote:
>
> I tried #{} and ${}. Both did not work.
>
> When I use #{} , no errors , but simply does not return any rows.
>
> when I use ${} I am getting below error.
>
> ### Error querying database.  Cause:
> org.apache.ibatis.reflection.ReflectionException: There is no getter for
> property named 'whereClause' in 'class java.lang.String'
> ### The error may exist in com/boeing/siai/pmws/mapping/PmwsSqlMap.xml
> ### The error may involve com.boeing.siai.pmws.domain.WorkPkgInfo.getWPIData
> ### The error occurred while executing a query
> ### Cause: org.apache.ibatis.reflection.ReflectionException: There is no
> getter for property named 'whereClause'  in 'class java.lang.String'
>
> On Wed, Oct 6, 2010 at 2:45 PM, Brian Barnett <[hidden email]> wrote:
>
> From page 28 of docs:
>
> String Substitution
>
> By default, using the #{} syntax will cause MyBatis to generate
> PreparedStatement properties and set
>
> the values safely against the PreparedStatement parameters (e.g. ?). While
> this is safer, faster and
>
> almost always preferred, sometimes you just want to directly inject a string
> unmodified into the SQL
>
> Statement. For example, for ORDER BY, you might use something like this:
>
> ORDER BY ${columnName}
>
> Here MyBatis won't modify or escape the string.
>
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of radha
> Sent: Wednesday, October 06, 2010 2:24 PM
> To: [hidden email]
> Subject: Re: how to embed part of query dynamically to a select element in
> Ibatis 3
>
> I want to clarify one thing here. Even though I said dynamic in the subject,
> it is not a dynamic query. It is a simple select , but having different
> where clause at runtime based on request.
>
> On Wed, Oct 6, 2010 at 12:56 PM, radha <[hidden email]> wrote:
>
> I have a requirement where part of query need to be passed to a select
> elemet like below. If you see below I will construct the whereclause and
> pass to this select.Below statement worked in iBats2.
>
> <
>
> select id="getWPIData" parameterType="java.lang.String"
> resultType="WorkPkgInfo" resultMap="PMWSFTCSMap" >
>
> select * from table $whereClause$
>
> </select>
>
> Can anyone suggest how to do in iBatis3.
Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
In reply to this post by AntPort

Here are my xml files. Do you see anything wrong in them. The variable whereClause will have value something like "model = 'xxx' and Line_No in (1,2) or model = 'yyy' and Line_No in (3,4)"


PmwsSqlMap.xml
--------------
<mapper namespace="com.siai.pmws.domain.WorkPkgInfo">

  <resultMap id="PMWSFTCSMap" type="WorkPkgInfo" >

    <result property="lineNum"             column="Line_No"          />
    <result property="ipName"         column="ip_name"          />
    <result property="ipTitle"                  column="ip_title"         />
    <result property="csIdentifier"      column="cs_identifier"    />
    <result property="changeOrder"         column="change_order"     />
    <result property="soiStatus"       column="SOI_Status"       />
    <result property="soiCompletionDate"    column="SOI_Completion_Date"  />
    <result property="model"       column="Model"             />
  </resultMap>

<select id="getWPIData" parameterType="java.lang.String" resultMap="PMWSFTCSMap">
select * from FTCS_WRK_PKG_INFO where ${whereClause}

</select>
</mapper>


PMWSConfig.xml
--------------
<configuration>
<typeAliases>
        <typeAlias type="com.boeing.siai.pmws.domain.WorkPkgInfo"
            alias="WorkPkgInfo" />
    </typeAliases>

    <environments default="development">
  <environment id="development">
      <transactionManager type="JDBC"/>
       <dataSource type="JNDI">
           <property name="data_source" value="jdbc/WPSRuntimeTransactionData"/>
       </dataSource>
  </environment>
    </environments>
    <mappers>
        <mapper resource="com/siai/pmws/mapping/PmwsSqlMap.xml" />
    </mappers>
</configuration>

Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
In reply to this post by AntPort
By the way what is this "hr.abcinfo.utility.ibatis.domain.DynamicQueryObject" class. does this class have whereCondition and orderBy fields?
 
In mycase whereClause is a string varible not a separate class.


On Thu, Oct 7, 2010 at 12:57 AM, AntPort <[hidden email]> wrote:
Maybe this will help...

       <resultMap id="LanguageMap"
type="hr.abcinfo.domain.abcnew.LanguagePojo">
               <result column="languageId" property="sJezik" jdbcType="VARCHAR" />
               <result column="languageName" property="nJezik" jdbcType="VARCHAR" /
>
       </resultMap>

       <sql id="selectList">
               S_JEZIK AS sJezik,
               N_JEZIK AS nJezik
       </sql>

       <sql id="fromList">
               A_JEZIK a_jezik
       </sql>

       <select id="countLangFilter" parameterType="String" resultType="int"
               useCache="true" flushCache="false">
               SELECT COUNT(*)
               FROM
               <include refid="fromList" />
               ${value}
       </select>

{$value} is dynamic generated part of where sql...

...or like this...

       <select id="selectLangFilter"
parameterType="hr.abcinfo.utility.ibatis.domain.DynamicQueryObject"
               resultType="hr.abcinfo.domain.abcnew.LanguagePojo" useCache="true"
               flushCache="false">
               SELECT
               <include refid="selectList" />
               FROM
               <include refid="fromList" />
               ${whereCondition} ${orderBy}
       </select>

...works fine for us...


On Oct 6, 9:56 pm, radha <[hidden email]> wrote:
> I have a requirement where part of query need to be passed to a select
> elemet like below. If you see below I will construct the whereclause and
> pass to this select.Below statement worked in iBats2.
>
> <select id="getWPIData" parameterType="java.lang.String"
> resultType="WorkPkgInfo"
> resultMap="PMWSFTCSMap" >
>
> select * from table $whereClause$
>
> </select>
>
> Can anyone suggest how to do in iBatis3.

Reply | Threaded
Open this post in threaded view
|

RE: how to embed part of query dynamically to a select element in Ibatis 3

Poitras Christian
In reply to this post by radha

Did you try using ${value} instead of ${ehereClause}?

 

De : [hidden email] [mailto:[hidden email]] De la part de radha
Envoyé : October-07-10 12:34 PM
À : [hidden email]
Objet : Re: how to embed part of query dynamically to a select element in Ibatis 3

 

Here are my xml files. Do you see anything wrong in them. The variable whereClause will have value something like "model = 'xxx' and Line_No in (1,2) or model = 'yyy' and Line_No in (3,4)"


PmwsSqlMap.xml
--------------
<mapper namespace="com.siai.pmws.domain.WorkPkgInfo">

  <resultMap id="PMWSFTCSMap" type="WorkPkgInfo" >

    <result property="lineNum"             column="Line_No"          />
    <result property="ipName"         column="ip_name"          />
    <result property="ipTitle"                  column="ip_title"         />
    <result property="csIdentifier"      column="cs_identifier"    />
    <result property="changeOrder"         column="change_order"     />
    <result property="soiStatus"       column="SOI_Status"       />
    <result property="soiCompletionDate"    column="SOI_Completion_Date"  />
    <result property="model"       column="Model"             />
  </resultMap>

<select id="getWPIData" parameterType="java.lang.String" resultMap="PMWSFTCSMap">
select * from FTCS_WRK_PKG_INFO where ${whereClause}

</select>
</mapper>


PMWSConfig.xml
--------------
<configuration>
<typeAliases>
        <typeAlias type="com.boeing.siai.pmws.domain.WorkPkgInfo"
            alias="WorkPkgInfo" />
    </typeAliases>

    <environments default="development">
  <environment id="development">
      <transactionManager type="JDBC"/>
       <dataSource type="JNDI">
           <property name="data_source" value="jdbc/WPSRuntimeTransactionData"/>
       </dataSource>
  </environment>
    </environments>
    <mappers>
        <mapper resource="com/siai/pmws/mapping/PmwsSqlMap.xml" />
    </mappers>
</configuration>

Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
I tried with ${value}. Now I am getting result set. But only first
time. from next run onwards I am not getting any result set. When I re-
deploy my app on server it works for first time. Next time onwards no
result set returns and no erros.

On Oct 7, 10:40 am, Poitras Christian <[hidden email]>
wrote:

> Did you try using ${value} instead of ${ehereClause}?
>
> De : [hidden email] [mailto:[hidden email]] De la part de radha
> Envoyé : October-07-10 12:34 PM
> À : [hidden email]
> Objet : Re: how to embed part of query dynamically to a select element in Ibatis 3
>
> Here are my xml files. Do you see anything wrong in them. The variable whereClause will have value something like "model = 'xxx' and Line_No in (1,2) or model = 'yyy' and Line_No in (3,4)"
>
> PmwsSqlMap.xml
> --------------
> <mapper namespace="com.siai.pmws.domain.WorkPkgInfo">
>
>   <resultMap id="PMWSFTCSMap" type="WorkPkgInfo" >
>
>     <result property="lineNum"             column="Line_No"          />
>     <result property="ipName"         column="ip_name"          />
>     <result property="ipTitle"                  column="ip_title"         />
>     <result property="csIdentifier"      column="cs_identifier"    />
>     <result property="changeOrder"         column="change_order"     />
>     <result property="soiStatus"       column="SOI_Status"       />
>     <result property="soiCompletionDate"    column="SOI_Completion_Date"  />
>     <result property="model"       column="Model"             />
>   </resultMap>
>
> <select id="getWPIData" parameterType="java.lang.String" resultMap="PMWSFTCSMap">
> select * from FTCS_WRK_PKG_INFO where ${whereClause}
>
> </select>
> </mapper>
>
> PMWSConfig.xml
> --------------
> <configuration>
> <typeAliases>
>         <typeAlias type="com.boeing.siai.pmws.domain.WorkPkgInfo"
>             alias="WorkPkgInfo" />
>     </typeAliases>
>
>     <environments default="development">
>   <environment id="development">
>       <transactionManager type="JDBC"/>
>        <dataSource type="JNDI">
>            <property name="data_source" value="jdbc/WPSRuntimeTransactionData"/>
>        </dataSource>
>   </environment>
>     </environments>
>     <mappers>
>         <mapper resource="com/siai/pmws/mapping/PmwsSqlMap.xml" />
>     </mappers>
> </configuration>
Reply | Threaded
Open this post in threaded view
|

RE: how to embed part of query dynamically to a select element in Ibatis 3

Poitras Christian
Try to add logging for java.sql. That will you find the SQL executed on serveur.

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de radh
Envoyé : October-07-10 2:05 PM
À : mybatis-user
Objet : Re: how to embed part of query dynamically to a select element in Ibatis 3

I tried with ${value}. Now I am getting result set. But only first
time. from next run onwards I am not getting any result set. When I re-
deploy my app on server it works for first time. Next time onwards no
result set returns and no erros.

On Oct 7, 10:40 am, Poitras Christian <[hidden email]>
wrote:

> Did you try using ${value} instead of ${ehereClause}?
>
> De : [hidden email] [mailto:[hidden email]] De la part de radha
> Envoyé : October-07-10 12:34 PM
> À : [hidden email]
> Objet : Re: how to embed part of query dynamically to a select element in Ibatis 3
>
> Here are my xml files. Do you see anything wrong in them. The variable whereClause will have value something like "model = 'xxx' and Line_No in (1,2) or model = 'yyy' and Line_No in (3,4)"
>
> PmwsSqlMap.xml
> --------------
> <mapper namespace="com.siai.pmws.domain.WorkPkgInfo">
>
>   <resultMap id="PMWSFTCSMap" type="WorkPkgInfo" >
>
>     <result property="lineNum"             column="Line_No"          />
>     <result property="ipName"         column="ip_name"          />
>     <result property="ipTitle"                  column="ip_title"         />
>     <result property="csIdentifier"      column="cs_identifier"    />
>     <result property="changeOrder"         column="change_order"     />
>     <result property="soiStatus"       column="SOI_Status"       />
>     <result property="soiCompletionDate"    column="SOI_Completion_Date"  />
>     <result property="model"       column="Model"             />
>   </resultMap>
>
> <select id="getWPIData" parameterType="java.lang.String" resultMap="PMWSFTCSMap">
> select * from FTCS_WRK_PKG_INFO where ${whereClause}
>
> </select>
> </mapper>
>
> PMWSConfig.xml
> --------------
> <configuration>
> <typeAliases>
>         <typeAlias type="com.boeing.siai.pmws.domain.WorkPkgInfo"
>             alias="WorkPkgInfo" />
>     </typeAliases>
>
>     <environments default="development">
>   <environment id="development">
>       <transactionManager type="JDBC"/>
>        <dataSource type="JNDI">
>            <property name="data_source" value="jdbc/WPSRuntimeTransactionData"/>
>        </dataSource>
>   </environment>
>     </environments>
>     <mappers>
>         <mapper resource="com/siai/pmws/mapping/PmwsSqlMap.xml" />
>     </mappers>
> </configuration>
Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
I enabled the trace and here is the steps that were executed first
time. For next run I am not seeing these execution steps at all.

org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ooo
Connection Opened
[10/7/10 11:11:58:514 PDT] 00000067 PreparedState 1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ==>
Executing: select
Line_No,ip_name,ip_title,cs_identifier,change_order,SOI_Status,SOI_Completion_Date,Model
from FTCS_WRK_PKG_INFO where model = 'xxx' and Line_No in (1424) or
model = 'bbb' and Line_No in (5,2,6,3,4) or model = 'abc' and Line_No
in (3356,2570,3464,2965,3052,3393,3138,3244)
[10/7/10 11:11:58:514 PDT] 00000067 PreparedState 1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ==>
Parameters:
[10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
<==    Columns: LINE_NO, IP_NAME, IP_TITLE, CS_IDENTIFIER,
CHANGE_ORDER, SOI_STATUS, SOI_COMPLETION_DATE, MODEL
[10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
<==        Row: 2, ipname_2, ip_title_2, cs2, change_order_2,
SOI_Status_2, null, xxx
[10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
<==        Row: 3, ipname_3, ip_title_3, cs3, change_order_3,
SOI_Status_3, null, xxx
[10/7/10 11:11:58:530 PDT] 00000067 SystemOut     O   ERROR:
MQUtil.readPropertiesFromFile() 11:11:58:530 PDT 10/07/2010
MessageListenerThreadPool : 0
 @@@@@@@@@@ Exception While reading properties file : null



On Oct 7, 11:28 am, Poitras Christian <[hidden email]>
wrote:

> Try to add logging for java.sql. That will you find the SQL executed on serveur.
>
> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]] De la part de radh
> Envoyé : October-07-10 2:05 PM
> À : mybatis-user
> Objet : Re: how to embed part of query dynamically to a select element in Ibatis 3
>
> I tried with ${value}. Now I am getting result set. But only first
> time. from next run onwards I am not getting any result set. When I re-
> deploy my app on server it works for first time. Next time onwards no
> result set returns and no erros.
>
> On Oct 7, 10:40 am, Poitras Christian <[hidden email]>
> wrote:
>
>
>
> > Did you try using ${value} instead of ${ehereClause}?
>
> > De : [hidden email] [mailto:[hidden email]] De la part de radha
> > Envoyé : October-07-10 12:34 PM
> > À : [hidden email]
> > Objet : Re: how to embed part of query dynamically to a select element in Ibatis 3
>
> > Here are my xml files. Do you see anything wrong in them. The variable whereClause will have value something like "model = 'xxx' and Line_No in (1,2) or model = 'yyy' and Line_No in (3,4)"
>
> > PmwsSqlMap.xml
> > --------------
> > <mapper namespace="com.siai.pmws.domain.WorkPkgInfo">
>
> >   <resultMap id="PMWSFTCSMap" type="WorkPkgInfo" >
>
> >     <result property="lineNum"             column="Line_No"          />
> >     <result property="ipName"         column="ip_name"          />
> >     <result property="ipTitle"                  column="ip_title"         />
> >     <result property="csIdentifier"      column="cs_identifier"    />
> >     <result property="changeOrder"         column="change_order"     />
> >     <result property="soiStatus"       column="SOI_Status"       />
> >     <result property="soiCompletionDate"    column="SOI_Completion_Date"  />
> >     <result property="model"       column="Model"             />
> >   </resultMap>
>
> > <select id="getWPIData" parameterType="java.lang.String" resultMap="PMWSFTCSMap">
> > select * from FTCS_WRK_PKG_INFO where ${whereClause}
>
> > </select>
> > </mapper>
>
> > PMWSConfig.xml
> > --------------
> > <configuration>
> > <typeAliases>
> >         <typeAlias type="com.boeing.siai.pmws.domain.WorkPkgInfo"
> >             alias="WorkPkgInfo" />
> >     </typeAliases>
>
> >     <environments default="development">
> >   <environment id="development">
> >       <transactionManager type="JDBC"/>
> >        <dataSource type="JNDI">
> >            <property name="data_source" value="jdbc/WPSRuntimeTransactionData"/>
> >        </dataSource>
> >   </environment>
> >     </environments>
> >     <mappers>
> >         <mapper resource="com/siai/pmws/mapping/PmwsSqlMap.xml" />
> >     </mappers>
> > </configuration>- Hide quoted text -
>
> - Show quoted text -
Reply | Threaded
Open this post in threaded view
|

RE: how to embed part of query dynamically to a select element in Ibatis 3

Brian Barnett
That is odd. Maybe it's a cache issue? If you have cache enabled, turn it
off and see of subsequent times work.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of radh
Sent: Thursday, October 07, 2010 12:33 PM
To: mybatis-user
Subject: Re: how to embed part of query dynamically to a select element in
Ibatis 3

I enabled the trace and here is the steps that were executed first time. For
next run I am not seeing these execution steps at all.

org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ooo
Connection Opened
[10/7/10 11:11:58:514 PDT] 00000067 PreparedState 1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ==>
Executing: select
Line_No,ip_name,ip_title,cs_identifier,change_order,SOI_Status,SOI_Completio
n_Date,Model
from FTCS_WRK_PKG_INFO where model = 'xxx' and Line_No in (1424) or model =
'bbb' and Line_No in (5,2,6,3,4) or model = 'abc' and Line_No in
(3356,2570,3464,2965,3052,3393,3138,3244)
[10/7/10 11:11:58:514 PDT] 00000067 PreparedState 1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ==>
Parameters:
[10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
<==    Columns: LINE_NO, IP_NAME, IP_TITLE, CS_IDENTIFIER,
CHANGE_ORDER, SOI_STATUS, SOI_COMPLETION_DATE, MODEL
[10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
<==        Row: 2, ipname_2, ip_title_2, cs2, change_order_2,
SOI_Status_2, null, xxx
[10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
<==        Row: 3, ipname_3, ip_title_3, cs3, change_order_3,
SOI_Status_3, null, xxx
[10/7/10 11:11:58:530 PDT] 00000067 SystemOut     O   ERROR:
MQUtil.readPropertiesFromFile() 11:11:58:530 PDT 10/07/2010
MessageListenerThreadPool : 0  @@@@@@@@@@ Exception While reading properties
file : null



On Oct 7, 11:28 am, Poitras Christian <[hidden email]>
wrote:
> Try to add logging for java.sql. That will you find the SQL executed on
serveur.

>
> -----Message d'origine-----
> De : [hidden email]
> [mailto:[hidden email]] De la part de radh Envoyé :
> October-07-10 2:05 PM À : mybatis-user Objet : Re: how to embed part
> of query dynamically to a select element in Ibatis 3
>
> I tried with ${value}. Now I am getting result set. But only first
> time. from next run onwards I am not getting any result set. When I
> re- deploy my app on server it works for first time. Next time onwards
> no result set returns and no erros.
>
> On Oct 7, 10:40 am, Poitras Christian <[hidden email]>
> wrote:
>
>
>
> > Did you try using ${value} instead of ${ehereClause}?
>
> > De : [hidden email]
> > [mailto:[hidden email]] De la part de radha Envoyé :
> > October-07-10 12:34 PM À : [hidden email] Objet : Re:
> > how to embed part of query dynamically to a select element in Ibatis
> > 3
>
> > Here are my xml files. Do you see anything wrong in them. The variable
whereClause will have value something like "model = 'xxx' and Line_No in
(1,2) or model = 'yyy' and Line_No in (3,4)"

>
> > PmwsSqlMap.xml
> > --------------
> > <mapper namespace="com.siai.pmws.domain.WorkPkgInfo">
>
> >   <resultMap id="PMWSFTCSMap" type="WorkPkgInfo" >
>
> >     <result property="lineNum"             column="Line_No"          
> > />
> >     <result property="ipName"         column="ip_name"          />
> >     <result property="ipTitle"                  column="ip_title"      
 

> > />
> >     <result property="csIdentifier"      column="cs_identifier"    
> > />
> >     <result property="changeOrder"         column="change_order"    
> > />
> >     <result property="soiStatus"       column="SOI_Status"       />
> >     <result property="soiCompletionDate"    
> > column="SOI_Completion_Date"  />
> >     <result property="model"       column="Model"             />
> >   </resultMap>
>
> > <select id="getWPIData" parameterType="java.lang.String"
> > resultMap="PMWSFTCSMap"> select * from FTCS_WRK_PKG_INFO where
> > ${whereClause}
>
> > </select>
> > </mapper>
>
> > PMWSConfig.xml
> > --------------
> > <configuration>
> > <typeAliases>
> >         <typeAlias type="com.boeing.siai.pmws.domain.WorkPkgInfo"
> >             alias="WorkPkgInfo" />
> >     </typeAliases>
>
> >     <environments default="development">
> >   <environment id="development">
> >       <transactionManager type="JDBC"/>
> >        <dataSource type="JNDI">
> >            <property name="data_source"
> > value="jdbc/WPSRuntimeTransactionData"/>
> >        </dataSource>
> >   </environment>
> >     </environments>
> >     <mappers>
> >         <mapper resource="com/siai/pmws/mapping/PmwsSqlMap.xml" />
> >     </mappers>
> > </configuration>- Hide quoted text -
>
> - Show quoted text-

Reply | Threaded
Open this post in threaded view
|

Re: how to embed part of query dynamically to a select element in Ibatis 3

radha
Thank you all. All my issues got resolved.

Christian - Thank you. Based on your  suggestions, I replace the $
{whereClause} with ${value} and started working

Brian - Thank you.for caching issue I am calling session.clearCatch();
before session.selet() method. That fixed the issue.


On Oct 7, 12:37 pm, "Brian Barnett" <[hidden email]> wrote:

> That is odd. Maybe it's a cache issue? If you have cache enabled, turn it
> off and see of subsequent times work.
>
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
>
> On Behalf Of radh
> Sent: Thursday, October 07, 2010 12:33 PM
> To: mybatis-user
> Subject: Re: how to embed part of query dynamically to a select element in
> Ibatis 3
>
> I enabled the trace and here is the steps that were executed first time. For
> next run I am not seeing these execution steps at all.
>
> org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ooo
> Connection Opened
> [10/7/10 11:11:58:514 PDT] 00000067 PreparedState 1
> org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ==>
> Executing: select
> Line_No,ip_name,ip_title,cs_identifier,change_order,SOI_Status,SOI_Completi­o
> n_Date,Model
> from FTCS_WRK_PKG_INFO where model = 'xxx' and Line_No in (1424) or model =
> 'bbb' and Line_No in (5,2,6,3,4) or model = 'abc' and Line_No in
> (3356,2570,3464,2965,3052,3393,3138,3244)
> [10/7/10 11:11:58:514 PDT] 00000067 PreparedState 1
> org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug ==>
> Parameters:
> [10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
> org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
> <==    Columns: LINE_NO, IP_NAME, IP_TITLE, CS_IDENTIFIER,
> CHANGE_ORDER, SOI_STATUS, SOI_COMPLETION_DATE, MODEL
> [10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
> org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
> <==        Row: 2, ipname_2, ip_title_2, cs2, change_order_2,
> SOI_Status_2, null, xxx
> [10/7/10 11:11:58:530 PDT] 00000067 ResultSet     1
> org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl debug
> <==        Row: 3, ipname_3, ip_title_3, cs3, change_order_3,
> SOI_Status_3, null, xxx
> [10/7/10 11:11:58:530 PDT] 00000067 SystemOut     O   ERROR:
> MQUtil.readPropertiesFromFile() 11:11:58:530 PDT 10/07/2010
> MessageListenerThreadPool : 0  @@@@@@@@@@ Exception While reading properties
> file : null
>
> On Oct 7, 11:28 am, Poitras Christian <[hidden email]>
> wrote:
> > Try to add logging for java.sql. That will you find the SQL executed on
> serveur.
>
> > -----Message d'origine-----
> > De : [hidden email]
> > [mailto:[hidden email]] De la part de radh Envoyé :
> > October-07-10 2:05 PM À : mybatis-user Objet : Re: how to embed part
> > of query dynamically to a select element in Ibatis 3
>
> > I tried with ${value}. Now I am getting result set. But only first
> > time. from next run onwards I am not getting any result set. When I
> > re- deploy my app on server it works for first time. Next time onwards
> > no result set returns and no erros.
>
> > On Oct 7, 10:40 am, Poitras Christian <[hidden email]>
> > wrote:
>
> > > Did you try using ${value} instead of ${ehereClause}?
>
> > > De : [hidden email]
> > > [mailto:[hidden email]] De la part de radha Envoyé :
> > > October-07-10 12:34 PM À : [hidden email] Objet : Re:
> > > how to embed part of query dynamically to a select element in Ibatis
> > > 3
>
> > > Here are my xml files. Do you see anything wrong in them. The variable
> whereClause will have value something like "model = 'xxx' and Line_No in
> (1,2) or model = 'yyy' and Line_No in (3,4)"
>
> > > PmwsSqlMap.xml
> > > --------------
> > > <mapper namespace="com.siai.pmws.domain.WorkPkgInfo">
>
> > >   <resultMap id="PMWSFTCSMap" type="WorkPkgInfo" >
>
> > >     <result property="lineNum"             column="Line_No"          
> > > />
> > >     <result property="ipName"         column="ip_name"          />
> > >     <result property="ipTitle"                  column="ip_title"      
>  
> > > />
> > >     <result property="csIdentifier"      column="cs_identifier"    
> > > />
> > >     <result property="changeOrder"         column="change_order"    
> > > />
> > >     <result property="soiStatus"       column="SOI_Status"       />
> > >     <result property="soiCompletionDate"    
> > > column="SOI_Completion_Date"  />
> > >     <result property="model"       column="Model"             />
> > >   </resultMap>
>
> > > <select id="getWPIData" parameterType="java.lang.String"
> > > resultMap="PMWSFTCSMap"> select * from FTCS_WRK_PKG_INFO where
> > > ${whereClause}
>
> > > </select>
> > > </mapper>
>
> > > PMWSConfig.xml
> > > --------------
> > > <configuration>
> > > <typeAliases>
> > >         <typeAlias type="com.boeing.siai.pmws.domain.WorkPkgInfo"
> > >             alias="WorkPkgInfo" />
> > >     </typeAliases>
>
> > >     <environments default="development">
> > >   <environment id="development">
> > >       <transactionManager type="JDBC"/>
> > >        <dataSource type="JNDI">
> > >            <property name="data_source"
> > > value="jdbc/WPSRuntimeTransactionData"/>
> > >        </dataSource>
> > >   </environment>
> > >     </environments>
> > >     <mappers>
> > >         <mapper resource="com/siai/pmws/mapping/PmwsSqlMap.xml" />
> > >     </mappers>
> > > </configuration>- Hide quoted text -
>
> > - Show quoted text-- Hide quoted text -
>
> - Show quoted text -