Quantcast

Binding variables with in clause statements

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Binding variables with in clause statements

Andreas Markitanis
Is there a way to use in clause statements in myBatis with binding?

Something that allows this kind of behaviour basically:

http://oradim.blogspot.com/2007/12/dynamically-creating-variable-in-list.html

Thanks
Andreas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Binding variables with in clause statements

Benoît
Hi Andreas,


Try the <foreach> tag in you XML mapper file.

The variable bound to 'list' is an ArrayList
-- snip --
        FAFRID IN
                                <foreach collection="list" item="formName" open="("
                                        separator="," close=")">
                                        #{formName}
                                </foreach>
--

Regards,
Benoît

On Feb 28, 3:52 pm, kkudi <[hidden email]> wrote:
> Is there a way to use in clause statements in myBatis with binding?
>
> Something that allows this kind of behaviour basically:
>
> http://oradim.blogspot.com/2007/12/dynamically-creating-variable-in-l...
>
> Thanks
> Andreas
Loading...