title: How to find a column field which is not primary key in JPA
body: <p>I have a situation like this if the user enters a particular number which is already present in the DB I should throw exception.</p>
  
  <p>I tried to use em.find method in JPA but in em.find method we need to pass entity class and primary key but here the column I want to find is not primary key.</p>
  
  <p>Ex:em.find("Article.class",articleno); where articleno is not primary key</p>
  
  <p>And for this Article.class I have a composite primary key(ArticlePk.class)  where id and origin are primary keys.</p>
  
  <p>how to find the article no using composite primary key.</p>
  
  <p>Can you guys help me?</p>