title: Repeated column in mapping for entity (should be mapped with insert="false" update="false")
body: <p>I have 2 tables: Menu and Course. I mapped there are to 2 </p>
  
  <pre><code>package ir.parhoontoos.hibernate;
  
      import java.io.Serializable;
  
      import javax.persistence.Column;
      import javax.persistence.Entity;
      import javax.persistence.FetchType;
      import javax.persistence.GeneratedValue;
      import javax.persistence.Id;
      import javax.persistence.JoinColumn;
      import javax.persistence.ManyToOne;
      import javax.persistence.OneToMany;
      import javax.persistence.Table;
  
      @Entity
      @Table(name="course")
      public class Course implements Serializable{
          public Course() {
          }
  
          public Course(String title , String description , byte[] image , Menu menu){
              this.title = title;
              this.description = description;
              this.image = image;
              this.menu = menu;
          }
  
  
          private Integer course_id;
  
          private String title;
  
          private String description;
  
          private byte[] image;
  
          private Menu menu;
  
          @Id @GeneratedValue
          @Column(name="course_id" , unique = true, nullable = false)
          public Integer getCourse_id() {
              return course_id;
          }
          public void setCourse_id(Integer course_id) {
              this.course_id = course_id;
          }
  
          @Column(name="title")
          public String getTitle() {
              return title;
          }
          public void setTitle(String title) {
              this.title = title;
          }
  
          @Column(name="description")
          public String getDescription() {
              return description;
          }
          public void setDescription(String description) {
              this.description = description;
          }
  
          @Column(name="image")
          public byte[] getImage() {
              return image;
          }
          public void setImage(byte[] image) {
              this.image = image;
          }
  
          @ManyToOne(fetch = FetchType.LAZY)
          @JoinColumn(name = "menu_id", nullable = false , insertable=false , updatable=false)
          public Menu getMenu() {
              return menu;
          }
  
          public void setMenu(Menu menu) {
              this.menu = menu;
          }
      }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>package ir.parhoontoos.hibernate;
  
  import java.io.Serializable;
  import java.util.Set;
  
  import javax.persistence.CascadeType;
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.FetchType;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  import javax.persistence.JoinColumn;
  import javax.persistence.OneToMany;
  import javax.persistence.Table;
  
  @Entity
  @Table(name="menu")
  public class Menu implements Serializable{
  
      public Menu() {
      }
  
      public Menu(String title) {
          this.title = title;
      }
  
      @Id @GeneratedValue
      @Column(name="menu_id" , unique = true, nullable = false)
      private int id;
  
      @Column(name="title")
      private String title;
  
      @OneToMany(fetch = FetchType.LAZY, mappedBy = "menu")
      private Set&lt;Course&gt; posts;
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public Set&lt;Course&gt; getPosts() {
          return posts;
      }
  
      public void setPosts(Set&lt;Course&gt; posts) {
          this.posts = posts;
      }
  
  }
  </code></pre>
  
  <p>Tables:</p>
  
  <pre><code>CREATE TABLE `course` (
    `course_id` int(11) NOT NULL AUTO_INCREMENT,
    `title` text NOT NULL,
    `description` text NOT NULL,
    `image` binary(1) NOT NULL,
    `menu_id` int(11) NOT NULL,
    PRIMARY KEY (`id`,`menu_id`),
    KEY `fk_course_menu_idx` (`menu_id`),
    CONSTRAINT `fk_course_menu` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
  )
  </code></pre>
  
  <p>And</p>
  
  <pre><code>CREATE TABLE `menu` (
    `menu_id` int(11) NOT NULL AUTO_INCREMENT,
    `title` text,
    PRIMARY KEY (`id`)
  )
  </code></pre>
  
  <p>when try to create session object i have this exception:</p>
  
  <blockquote>
    <p>org.hibernate.MappingException: Repeated column in mapping for entity:
    ir.parhoontoos.hibernate.Course column: id (should be mapped with
    insert="false" update="false")</p>
  </blockquote>