ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fran├žois Schiettecatte <fschietteca...@gmail.com>
Subject Re: Dynamic table replacement possible in iBatis3 ?
Date Wed, 07 Apr 2010 22:59:17 GMT
The format did change, here is the new format:

	<select id="selectCountBySourceKey" parameterType="String" resultType="Integer">

		/* contents.Content.selectCountBySourceKey */
		SELECT	COUNT(*)
		FROM	contents
		WHERE	source_key = #{value}

	</select>


Fran├žois

On Apr 7, 2010, at 5:54 PM, Niels Beekman wrote:

> In iBATIS 2, you would use ${value}. Maybe this still holds for version 3?
> 
> Niels
> 
> On 7 April 2010 16:46, Joram Barrez <joram.barrez@gmail.com> wrote:
> Hi All,
> 
> I was wondering if this is possible with iBatis 3:
> 
> <select id="selectTableCount" parameterType="string" resultType="long" >
>    select count(*) from ${tableName}
> </select>
> 
> The problem is that the string ${tableName} is not replaced by the
> parameter, leadin to a 'select count(*) from null' at runtime.
> Am I doing something wrong here or is this feature not yet implemeted
> (as it worked on iBatis2 according to Google)?
> 
> 
> Regards,
> 
> Joram
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message