[ 
http://nagoya.apache.org/jira/browse/IBATIS-26?page=comments#action_56589 ]
     
Philippe Laflamme commented on IBATIS-26:
-----------------------------------------

>>iBATIS doesn't parse SQL, never has, never will. 

Of course it should not, that's the whole point of SQLMaps is it not?

I wanted to point out that something "legal" in an SQLMap statement was not 
compatible with the ResultMap mechanism. This unbalanced situation caused 
confusion. It required a fix: either explicit documentation stating it was not 
supported or an alternative way of executing the statement.

I think your fix is the best way to go as a short term solution and I'm very 
grateful for the speed of your response.

What are the plans in the long run? I read somewhere about "sql fragments" is 
this being investigated further? I'm curious as to how iBatis will be evolving, 
I think it's an amazing tool.

> Support for dynamic result maps
> -------------------------------
>
>          Key: IBATIS-26
>          URL: http://nagoya.apache.org/jira/browse/IBATIS-26
>      Project: iBatis for Java
>         Type: Improvement
>   Components: SQL Maps
>     Reporter: Philippe Laflamme

>
> SQLMap statements allow for dynamic select clauses, but currently, it is 
> impossible to create dynamic result maps. For example:
> <select id="dynamicSelect" parameterClass="java.util.Map" 
> resultClass="java.util.HashMap"> 
> SELECT 
> <isPropertyAvailable property="countQuery"> 
> count(*) 
> </isPropertyAvailable> 
> <isNotPropertyAvailable property="countQuery"> 
> A, B, C 
> </isNotPropertyAvailable> 
> FROM [...] 
> </select>
> This construct is legal, but will break upon execution.
> It seems odd to have the ability to create dynamic select statements but not 
> have the ability to actually use them (without polluting the statement with 
> "NULL AS"). This issue is bound to come up often...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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

Reply via email to