title: Caused by: org.hibernate.MappingException: Could not determine type for: Employees [org.hibernate.mapping.Column(employees)]
body: <p>I am using <strong>Hibernate 4.1.0.Final</strong> with <strong>Spring 3.1.1</strong> .</p>
  
  <p>When I am doing junit test, I am getting the following exception</p>
  
  <pre><code>Caused by: org.springframework.beans.factory.BeanCreationException: Error 
  creating bean with name 'sessionFactory' defined in class path resource [spring-  
  context.xml]:     Invocation of init method failed; nested exception is 
  org.hibernate.MappingException: Could not determine type for: 
  test.entity.Employees,at table: PROJECT, for columns: 
  [org.hibernate.mapping.Column(employees)]
  </code></pre>
  
  <p><strong>Project Entity class</strong></p>
  
  <pre><code>@Entity
  @Table(name = "PROJECT")
  public class Project {
  @OneToOne
  @JoinColumn(name="EMP_NUMBER")
  private Employees employees;
  .....
  </code></pre>
  
  <p><strong>Employee Entity class</strong></p>
  
  <pre><code>@Entity
  @Table(name = "EMPLOYEES")
  public class Employees {
  private String employeeNo;
  
  @Id
  @Column(name = "EMP_NUMBER")
  public String getEmployeeNo() {
          return employeeNo;
      }
  public void setEmployeeNo(String employeeNo) {
          this.employeeNo = employeeNo;
      }
  </code></pre>
  
  <p><strong>Junit</strong> </p>
  
  <pre><code>import static org.junit.Assert.*;
  
  import org.junit.Test;
  import org.junit.runner.RunWith; 
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.test.context.ContextConfiguration;
  import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  import org.springframework.test.context.transaction.TransactionConfiguration;
  
  
  @RunWith(SpringJUnit4ClassRunner.class) 
  @ContextConfiguration(locations="classpath:spring-context.xml")
  @TransactionConfiguration(defaultRollback=true,transactionManager="transactionManager")
  public class ProjectTest {
  
      @Autowired
      private ProjectDAO projectDAO; 
  
      @Test 
      public void testProjectId() { 
      Project project = projectDAO.findProjectId(1L);
      assertNotNull(project); 
      } 
  }
  </code></pre>