I have this bean:
@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;
But I get this error:
Caused by: org.hibernate.AnnotationException: No identifier specified for entity: com...Acceso
How can I set this bean? What I need is based on the user ID get all the ROL-AREA that he has access.
I tried change the @Entity to @Embedded, but when I make the search no result is returned, and even in the log is no SQL sentence executed.
 
     
     
     
    