Hi, whenever i import annotations from org.hibernate.annotations.* my application throws Unknown Entitiy exception.
Code:
import javax.persistence.Id;
import org.hibernate.annotations.Entity;
import org.hibernate.annotations.Table;
@Entity()
@Table(name="company")
public class Company {
And the exception thrown is:
Code:
2006-02-10 10:58:07,843 [http-8080-Processor25] ERROR com.yamanyar.manager.buss.cm.CompanyOperationsLibrary - org.hibernate.MappingException: Unknown entity: com.yamanyar.manager.entities.Company
But if I import from javax.persistence.* everything works fine:
Code:
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity()
@Table(name="company")
public class Company {
What is the difference? Which one should be used when? In tutorial of hibernate, import statements are not shown...