7 Replies Latest reply on Jul 8, 2006 2:22 PM by Pete Muir

    the bundled hibernate doesn't work @oneToOne shared primary

    Dan Liu Apprentice

      Here is my code:

      public Long getId() { return id; }
      @OneToOne(fetch=FetchType.LAZY, cascade=CascadeType.ALL)
       public Employment getEmployment() { return employment; }
      Employment {
       @GenericGenerator(name="fk", strategy="foreign", parameters={
       @Parameter(name="property", value="owner")
       @GeneratedValue(strategy=GenerationType.AUTO, generator="fk")
       public Long getId(){ return id; }
       public AccountOwner getOwner(){ return owner; }

      Here is the error message I get:
      Unknown mappedBy in: Employment.owner, referenced property unknown: Owner.employment

      Any idea?