SetParametres in Query
<p>I'm trying to set a query with lot of parameters.</p>

<p>for a query with 1 param its working fine:</p>

<pre><code>//**
    List&lt;?&gt; list = null;
    String query = String.format("from %s where %s = :%s ", a, uniqueField[0], uniqueField[0]);
    list = s.createQuery(query).setParameter(uniqueField[0], arg0.getSsn()).list();
</code></pre>

<p>how can i do the same with this query : </p>

<pre><code>List&lt;?&gt; list = null;
String query = String.format("from %s where %s = :%s and %s = :%s ", a, uniqueField[0], uniqueField[0], uniqueField[1], uniqueField[1]);
// list = s.createQuery(query)... ?
</code></pre>

<p>Thanks for any advices..</p>