title: what am i missing for using hibernate annotation?
body: <p>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.</p>
  <p>the problem is when i add the line <code>@Table(name = &quot;user&quot;)</code></p>
  <p>it complains of a compile error:</p>
  <blockquote>
  <p>The annotation @Table must define the
  attribute appliesTo</p>
  </blockquote>
  <p>full code below:</p>
  <pre><code>package com.jr.entities.users;
  
  import java.io.Serializable;
  
  import org.hibernate.annotations.Entity;
  import org.hibernate.annotations.Table;
  
  @Entity
  @Table(name = &quot;user&quot;)
  public class DAOuser implements Serializable{
      
      private String uid;
      private String emailAddress;
      private String username;
      private String password;
      
  
  }
  </code></pre>
  <p>In this example link <a href="http://www.roseindia.net/hibernate/hibernateannotations/hibernate-annotations-tutorial.shtml" rel="nofollow noreferrer">http://www.roseindia.net/hibernate/hibernateannotations/hibernate-annotations-tutorial.shtml</a> 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.</p>
  <p>Thanks in advance</p>