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

Bug 347218

Summary: Collection/Join table: Default join column is gone once selecting "Override default"
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P2 CC: karenfbutzke, neil.hauge
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Nan Li CLA 2011-05-25 16:10:09 EDT
Build Identifier: 

1. Create a mapping file and add a type mapping to it
2. In the JPA structure pane, add an attribute to the XML and map it as a relationship or element collection mapping. If mapping the attribute as a relationship mapping, join table strategy should be adopted.
3. Try to select the "Override default" checkbox

The default join column entry is gone and trying to add a join column will result in exception. 

PS: for the inverse join columns of a join table, selecting "Override default" will lead the default one to disappear, but check the checkbox again will get the default one back, but with an extra and duplicate entry.

Reproducible: Always
Comment 1 Neil Hauge CLA 2011-05-25 17:31:53 EDT
This seems closely related to bug 342171.

This bug appears to have been introduced in the 4-28 I-Build for M7.  Before that this UI seems very stable.

This is probably not an RC3 candidate bug, as ugly as it is.  It can be worked around, and is only seen in XML mapping files.  That said, this is one of the areas where the mapping UI comes in handy, so this should be fixed at the earliest possible time.
Comment 2 Neil Hauge CLA 2011-07-01 16:26:41 EDT
Moving JPA specific bugs to new JPA component in bugzilla.
Comment 3 Karen Butzke CLA 2011-08-04 09:23:59 EDT
Nan, can you reproduce this issue in HEAD? I can reproduce it in maintenance, but am unable to in HEAD. I think my recent changes to how our collections are stored and updated may have fixed this problem
Comment 4 Nan Li CLA 2011-08-04 16:26:52 EDT
Karen, with the HEAD code, I tired several times and did see the issue of default join column twice, but I couldn't find the exact steps to reproduce it. Maybe that just happened with race condition. And I couldn't reproduce the issue of inverse join column.
Comment 5 Neil Hauge CLA 2011-08-23 17:51:24 EDT
Targeting to 3.1 for further investigation.
Comment 6 Neil Hauge CLA 2012-04-11 15:03:09 EDT
I can still reproduce this with a 1-M mapping in 3.2 M6.
Comment 7 Karen Butzke CLA 2012-05-03 10:51:29 EDT
I have fixed bug 342171 in M7 and I think this is the same issue.

*** This bug has been marked as a duplicate of bug 342171 ***