[ http://nagoya.apache.org/jira/browse/IBATIS-26?page=comments#action_56587 ] Clinton Begin commented on IBATIS-26: -------------------------------------
>> This construct is legal, but will break upon execution. iBATIS doesn't parse SQL, never has, never will. So the "construct" is simply text inside of XML tags, it doesn't know anything about the SQL. This is part of the power of iBATIS and why it is so powerful and flexible. That said, I've already added support for remappable result set metadata. It will be in the next release (it's already in CVS if you want to try it). All you need to do is add remapResults="true" to any statement element. For example: <statement ... remapResults="true" > It's an option because of the performance hits. Cheers, Clinton > 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
