You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Alexandru Barbat (JIRA)" <ib...@incubator.apache.org> on 2005/02/27 20:11:48 UTC

[jira] Created: (IBATIS-80) dynamic statement when the parameterClass="string"

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

[jira] Commented: (IBATIS-80) dynamic statement when the parameterClass="string"

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-80?page=comments#action_12313011 ] 

Brandon Goodin commented on IBATIS-80:
--------------------------------------

It will work fine. You simply need to do away with the property="otherColumn" in the isNotEmpty tag.

> 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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-80) dynamic statement when the parameterClass="string"

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-80?page=all ]
     
Brandon Goodin closed IBATIS-80:
--------------------------------

    Resolution: Invalid

not an issue

> 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
>     Assignee: Brandon Goodin
>     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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (IBATIS-80) dynamic statement when the parameterClass="string"

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-80?page=all ]

Brandon Goodin reassigned IBATIS-80:
------------------------------------

    Assign To: Brandon Goodin

> 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
>     Assignee: Brandon Goodin
>     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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira