ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steffen Legler <s.leg...@tu-bs.de>
Subject Dynamically add sqlMaps to Config.xml
Date Fri, 27 May 2005 12:26:45 GMT
Hi.

We need to add dynamically sqlMaps to our SqlMapClient.
Please can you implement something like this example in further releases?

Example:
 sqlMapClient = SqlMapClientBuilder.buildSqlMapClient(configReader, props);
 sqlMapClient.addResource(xyz.xml)

Dynamically build SQL-Statements include a lot of spaces when using conditional
Elements like <isEqual>. The Database doesn't care, but for logging it would be
nice to have a well written sql-statement.

<update id="update" parameterClass="class">
 update table set
 <isEqual property="unit_type_selectionId" compareValue="2">
  column=#column#
 </isEqual>
 <isEqual property="unit_type_selectionId" compareValue="2">
  column1=#column#
 </isEqual>
where id=#id#
</update>

Sql-Statement:
         update table set              column=#column#        where id=#id#

Hope its possible to implement this two functions in future releases.

Thanks,
Steffen

Mime
View raw message