Hi, Pramod,

As we discussed this morning, there is an alternate, simpler query that
meets your particular needs and avoids modifying the core class
Persistence.java.

If this is not the case, please repost. Otherwise I'll close the issue.

Keith Pierce

On Tue, Mar 4, 2008 at 9:33 AM, Pramod Biligiri <[EMAIL PROTECTED]>
wrote:

>
> Hi,
> Issue 1670 (https://mifos.dev.java.net/issues/show_bug.cgi?id=1670)
> describes the problem:
> If you pass a java.util.Collection as a query parameter using
> Persistence.java, then the items
> in the collection are not picked up in the query if you use them, say, in
> a WHERE clause
> (Eg: "where role_id in (:roles)" where :roles is an ArrayList)
>
> This is because  Persistence.setParametersInQuery
> uses "query.setParameter()" instead of "query.setParameterList()" for
> Collection parameters.
>
> The patch fixes the problem by checking if the parameter is of type
> Collection, and using
> query.setParameterList appropriately. It also contains a testcase for the
> same.
>
> It has been applied and tested against mifos revision 12363.
>
> Pramod Biligiri,
> ThoughtWorks
> P.S: Please ignore 3 leading path segments when applying the patch.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to