Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 258528

Summary: [JPA 2.0] mapped-by dot notation support for embeddables
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: GeneralAssignee: Karen Butzke <karenfbutzke>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 Keywords: plan
Version: 2.1   
Target Milestone: 2.3 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard: JPA2.0

Description Karen Butzke CLA 2008-12-11 14:05:54 EST
1-1, m-m, and 1-m all support mappedBy, we now must add dot notation support for the case where the mapped by is in an embedded.

@Entity
public class Employee {
  @Id int id;
  @Embedded JobInfo jobInfo;
...
}
@Embeddable
public class JobInfo {
  String jobDescription;
  @ManyToOne ProgramManager pm; // Bidirectional
}
@Entity
public class ProgramManager {
  @Id int id;
  @OneToMany(mappedBy="jobInfo.pm")
  Collection<Employee> manages;
}
Comment 1 Karen Butzke CLA 2009-10-05 11:29:25 EDT
fixed in M3