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

Bug 331678

Summary: [Validation] Need validation for duplicate column pairs
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: neil.hauge
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Nan Li CLA 2010-12-02 10:03:06 EST
Build Identifier: 20100917-0705

A validation message should be provided when duplicate column pairs are defined for join columns/inverse join columns/pk join columns. This validation applies when the source and reference column of the defined pairs are both duplicated. Take join table definition for instance, the duplicate should be reported when a join table is defined like 

@ManyToMany
@JoinTable(name = "PROJ_EMP", schema = "APP2",
           joinColumns = { @JoinColumn(name = "EMP_ID",        
                                       referencedColumnName = "EMP_ID"),
                           @JoinColumn(name = "EMP_ID",
                                       referencedColumnName = "EMP_ID")},
           inverseJoinColumns = { @JoinColumn(name = "PROJ_ID",
                                              referencedColumnName = "PROJ_ID"),
                                  @JoinColumn(name = "PROJ_ID",
                                              referencedColumnName = "PROJ_ID")
})
    public List<Project> projects; 


Reproducible: Always

Steps to Reproduce:
Define join columns/inverse join columns/pk join columns for relationship mappings
Comment 1 Neil Hauge CLA 2011-07-01 16:25:18 EDT
Moving JPA specific bugs to new JPA component in bugzilla.