title: AnnotationException:mappedBy reference an unknown target entity property
body: <p>I am having an issue in setting up a one to many relationship in my annotated object.
  I have the following:
  my application has simple mapping like a phase can have many tache(task). But a task can only belong to a single phase. Here is what I think the code should be.
  this is the task class
      enter code here</p>
  
  <pre><code> package com.gestion.projet.entities;
   import java.io.Serializable;
   import java.util.Collection;
   import java.util.Date;
   import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.JoinColumn;
  import javax.persistence.ManyToOne;
  import javax.persistence.OneToMany;
  import javax.persistence.Table;
  @Entity
  @Table(name="Tache")
  public class Tache implements Serializable{
  @Id
  @GeneratedValue(strategy=GenerationType.IDENTITY)
  private Long idTache;
  private String nomTache;
  private String statusTache;
  private Date dateDebut;
  private Date dateFin;
  @ManyToOne
  @JoinColumn(name="idPhase")
  private Tache tacheParente;
  private Long predecesseur;
  private Long durre;
  private String commentaire;
  private String type ;
  private boolean confidentialité;
  @ManyToOne
  @JoinColumn(name="idPhase")
  private Phase phases;
  @OneToMany(mappedBy="idTache")
  private Collection&lt;MembreTache&gt; membreTaches;
  
  public Tache(String nomTache, String statusTache, Date dateDebut,
          Date dateFin, Tache tacheParente, Long predecesseur, Long durre,
          String commentaire, String type, boolean confidentialité) {
      super();
      this.nomTache = nomTache;
      this.statusTache = statusTache;
      this.dateDebut = dateDebut;
      this.dateFin = dateFin;
      this.tacheParente = tacheParente;
      this.predecesseur = predecesseur;
      this.durre = durre;
      this.commentaire = commentaire;
      this.type = type;
      this.confidentialité = confidentialité;
  }
  
  public String getNomTache() {
      return nomTache;
  }
  
  public void setNomTache(String nomTache) {
      this.nomTache = nomTache;
  }
  
  public String getStatusTache() {
      return statusTache;
  }
  
  public void setStatusTache(String statusTache) {
      this.statusTache = statusTache;
  }
  
  public Date getDateDebut() {
      return dateDebut;
  }
  
  public void setDateDebut(Date dateDebut) {
      this.dateDebut = dateDebut;
  }
  
  public Date getDateFin() {
      return dateFin;
  }
  
  public void setDateFin(Date dateFin) {
      this.dateFin = dateFin;
  }
  
  public Tache getTacheParente() {
      return tacheParente;
  }
  
  public void setTacheParente(Tache tacheParente) {
      this.tacheParente = tacheParente;
  }
  
  public Long getPredecesseur() {
      return predecesseur;
  }
  
  public void setPredecesseur(Long predecesseur) {
      this.predecesseur = predecesseur;
  }
  
  public Tache() {
      super();
      // TODO Auto-generated constructor stub
  }
  
  public Long getDurre() {
      return durre;
  }
  
  public void setDurre(Long durre) {
      this.durre = durre;
  }
  
  public String getCommentaire() {
      return commentaire;
  }
  
  public void setCommentaire(String commentaire) {
      this.commentaire = commentaire;
  }
  
  public String getType() {
      return type;
  }
  
  public void setType(String type) {
      this.type = type;
  }
  
  public boolean isConfidentialité() {
      return confidentialité;
  }
  
  public void setConfidentialité(boolean confidentialité) {
      this.confidentialité = confidentialité;
  }
  </code></pre>
  
  <p>}
  and this is the phase class:</p>
  
  <pre><code>package com.gestion.projet.entities;
  
  import java.io.Serializable;
  import java.util.Collection;
  import java.util.Date;
  
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.JoinColumn;
  import javax.persistence.ManyToOne;
  import javax.persistence.OneToMany;
  import javax.persistence.Table;
  @Entity
  @Table(name="Phase")
  public class Phase implements Serializable {
      @Id
      @GeneratedValue(strategy=GenerationType.IDENTITY)
      private Long idPhase;
      private String typePhase;
      private String desc;
      private Date dateDebut;
      @OneToMany(mappedBy="idPhase")
      private Collection&lt;Tache&gt; taches;
      private Date dateFin;
      @ManyToOne
      @JoinColumn(name="idProjet")
      private Projet projet;
      /*------*/
      public String getTypePhase() {
          return typePhase;
      }
      public void setTypePhase(String typePhase) {
          this.typePhase = typePhase;
      }
      public String getDesc() {
          return desc;
      }
      public void setDesc(String desc) {
          this.desc = desc;
      }
      public Date getDateDebut() {
          return dateDebut;
      }
      public void setDateDebut(Date dateDebut) {
          this.dateDebut = dateDebut;
      }
      public Date getDateFin() {
          return dateFin;
      }
      public void setDateFin(Date dateFin) {
          this.dateFin = dateFin;
      }
      public Phase() {
          super();
          // TODO Auto-generated constructor stub
      }
      public Phase(String typePhase, String desc, Date dateDebut,
              Date dateFin) {
          super();
  
          this.typePhase = typePhase;
          this.desc = desc;
          this.dateDebut = dateDebut;
          this.dateFin = dateFin;
      }
  
  
  }
  </code></pre>