i am trying to create a basic hibernate entity POJO using latest hibernate and i have added the necesary jar files i downloaded from hibernate website.
the problem is when i add the line @Table(name = "user")
it complains of a compile error:
The annotation @Table must define the attribute appliesTo
full code below:
package com.jr.entities.users;
import java.io.Serializable;
import org.hibernate.annotations.Entity;
import org.hibernate.annotations.Table;
@Entity
@Table(name = "user")
public class DAOuser implements Serializable{
private String uid;
private String emailAddress;
private String username;
private String password;
}
In this example link http://www.roseindia.net/hibernate/hibernateannotations/hibernate-annotations-tutorial.shtml it says that it does not need to applyTo value to be set? Am I missing something? I created a simple EJB3 project in eclipse J2ee if it helps.
Thanks in advance