title: What should i do if i want to set two parameters in jpa with query.setParameter ?
body: <p>More specifically i have 3 entities(doctors, patients, prescripts). The prescripts entity has two foreign keys refering to doctors and patients. So what i want to do is find prescripts by patid and docid. The problem is i can set two parameters using query.setParameter so what do i have to do?</p>
  
  <pre><code>public List&lt;Prescripts&gt; findByDocid(Doctors fbd) {
  
  TypedQuery&lt;Prescripts&gt; query = em.createNamedQuery("Prescripts.findByDocid",
  Prescripts.class);
  List&lt;Prescripts&gt; prescripts = query.setParameter
  ("docid",fbd).getResultList();
  return prescripts;
  }
  </code></pre>
  
  <p>If you want more code, let me know.</p>
  
  <p>Thanks.</p>