ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yaojian <sky...@gmail.com>
Subject Embed inline-parameter-map in simple-dynamic-sql element?
Date Mon, 12 Jan 2009 06:43:54 GMT

How to make the IBatis.NET support embedding inline-parameterpmap in
simple-dynamic-sql element ?

For example, I have the following pseudocode:
in the sql map:

        <select id="DynamicSqlStatement"
resultClass="System.Collections.IDictionary" parameterClass="String">

and in code:

Hashtable paramObject = new Hashtable();
paramObject.Add("__DynamicSql", "SELECT CATALOG_NAME, SCHEMA_NAME FROM
paramObject.Add("CatalogName", "master");

Mapper.QueryForList<IDictionary>("DynamicSqlStatement", paramObject);


Currently, this result is a sql exception as the IBaits.NET send the text of
"__DynamicSql" directly to the sql server and so the "
#CatalogName,dbType=NVarChar#" is not a valid sql fragement.

I want the IBatis.NET treat the "CatalogName" as an inline-parameter-map
instead of send the original text of "__DynamicSql" directly to sql server.

It's may require the IBatis.NET parse the content of a mapped-statement

View raw message