title: Spring Boot | Making another Entity class object in Entity class
body: <p>I am trying to create a library API. I have a Book Entity and a Member Entity.
  In Book class, I have created an of Member class to check whether Book is given to Member or not.
  Likewise for Member class.</p>
  <p>But the thing is I am getting an error for doing such</p>
  <pre><code>Could not determine type for: com.example.demo.Member, at table: book, for columns: [org.hibernate.mapping.Column(member)]
  Could not determine type for: com.example.demo.Member, at table: book, for columns: [org.hibernate.mapping.Column(member)]
  </code></pre>
  <p>I have found many answers related to this topic but ...
  They all were using classes in collection
  <strong>List</strong>
  What annotation should I add to them??</p>
  <p><strong>Book.java</strong></p>
  <pre><code>@Entity
  public class Book {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private long id;
      private int page;
      private String name;
      private String author;
      private String publisher;
      private Date dateOfBookRegistration;
      private Member member;
      
      // getters setters ...
  }
  </code></pre>
  <p><strong>Member</strong></p>
  <pre><code>@Entity
  public class Member {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private long id;
      private String name;
      private Date dateOfRegistration;
      private Date dateOfBirth;
      private Date dateOfGettingBook;
      private Book book;
  
      // getters setters ...
  }
  </code></pre>