Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331678 - [Validation] Need validation for duplicate column pairs
Summary: [Validation] Need validation for duplicate column pairs
Status: NEW
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 10:03 EST by Nan Li CLA
Modified: 2011-07-01 16:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.