dynamic statement when the parameterClass="string"
--------------------------------------------------
Key: IBATIS-80
URL: http://issues.apache.org/jira/browse/IBATIS-80
Project: iBatis for Java
Type: Improvement
Components: SQL Maps
Versions: 2.0.9
Environment: Windows XP
jdk 1.5.0
Reporter: Alexandru Barbat
Priority: Trivial
(working) Example:
<select id="customQuery" resultMap="custom-result" parameterClass="string">
select CODE as VALUE, NAME as LABEL
from SOME_TABLE
where SOME_COLUMN=1
and OTHER_COLUMN=#otherColumn#
</select>
(wish to work: example)
<select id="customQuery" resultMap="custom-result" parameterClass="string">
select CODE as VALUE, NAME as LABEL
from SOME_TABLE
where SOME_COLUMN=1
<dynamic>
<isNotEmpty prepend="and" property="otherColumn">
OTHER_COLUMN=#otherColumn#
</isNotEmpty>
</dynamic>
</select>
I think it is natural (but it doesn't working).
If the parameter has type : string, integer etc then any property (with any
name) which appear in the statement to take the value from parameter.
Please corect me if I'm wrong.
Thank
ps
This improvement will cut down the cost when I have only one parameter .. I
will not need a bean or a map to use the dynamic statements.
xandu
--
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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira