1 Reply Latest reply on Oct 8, 2007 2:59 AM by Christian Bauer

    mappedBy in Hibernate Annotation

    sucheta chakraborty Newbie

      Getting
      org.hibernate.AnnotationException: Unknown mappedBy in: LocalizedString.values, referenced property unknown: LocalizedStringMap.localizedString.

      LocalizedString -
      @OneToOne(mappedBy = "localizedString")
      @Cascade({ CascadeType.ALL, CascadeType.DELETE_ORPHAN})
      private LocalizedStringMap values;

      LocalizedStringMap -
      @OneToOne
      @JoinColumn(name="LocalizedString_id", nullable = false)
      private LocalizedString localizedString;
      & has corresponding getters & setters (public).

      Please point out why I am getting the above mentioned error.
      Thanks in advance.