title: How to map a search object to a class with more fields with JPA annotations
body: <p>I'm a newbie with JPA.</p>
  
  <p>I need to map a search object to a table.
  The search object has only and id, name. The big object has more fileds id, name, adress and more.</p>
  
  <p>I use this as big object
  view plaincopy to clipboardprint?</p>
  
  <p>I use this as big object</p>
  
  <pre><code>@Entity
  @Table(name="users")
  public class User {
  
   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   private long id;
  
   private String name;
   private String adress;
   private String keywords;
  }
  
  //this is my search object
  @XXX
  public class UserSearch {
  
   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   private long id;
  
   private String name;
  
  }
  </code></pre>
  
  <p>What annotations I need to use to map the search object to the table users?</p>
  
  <p>I'm using spring+struts2+hibernate+JPA.</p>
  
  <p>Help is appreciated!
  Thanks! </p>