title: how to set a @entity without @id element?
body: <p>I have this bean:</p>
  
  <pre><code>@Entity
  @Table(name = "accesos")
  public class Acceso implements Serializable {
      /** */
      @Column(name = "idUser")
      private String idUser;
      /** */
      @ManyToOne
      @JoinColumn(name = "idArea")
      private Area area;
      /** */
      @ManyToOne
      @JoinColumn(name = "idRol")
      private Rol rol;
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>Caused by: org.hibernate.AnnotationException: No identifier specified for entity: com...Acceso</p>
  </blockquote>
  
  <p>How can I set this bean? What I need is based on the user ID get all the ROL-AREA that he has access.</p>
  
  <p>I tried change the <code>@Entity</code> to <code>@Embedded</code>, but when I make the search no result is returned, and even in the log is no SQL sentence executed.</p>