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

Bug 338216

Summary: Add checkbox in pref/prop page for One-to-Many old style relation in JPA 2.0 projects
Product: [WebTools] Dali JPA Tools Reporter: Stefan Dimov <stefan.dimov>
Component: Diagram EditorAssignee: Stefan Dimov <stefan.dimov>
Status: VERIFIED FIXED QA Contact: Stefan Dimov <stefan.dimov>
Severity: enhancement    
Priority: P3 CC: jolene.moffitt, kaloyan
Version: 3.0   
Target Milestone: 3.0 M6   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 338395    
Attachments:
Description Flags
patch
none
patch v2 none

Description Stefan Dimov CLA 2011-02-25 08:13:31 EST
In JPA 2.0 One-to-Many unidir relationships are supposed to have additional annotation @JoinColumn(s) of the relationship mapping attribute. (This way the DB tables will be generated without additional join table.) The old style rels are still supported for backward compatibility. 

The natural behavior of the editor (in JPA 2.0 projects) is to create One-to-Many unidir rel with @JoinColumn(s). Nevertheless we'd like to leave the user with an option here: 

There should be a checkbox in the editor pref/prop page which allows the user (if she checks is) to create an old style (JPA 1.0) One-to-Many unidir rels (in JPA 2.0 projects), i.e. - if this checkbox is checked the new 1-N unidir rels will be created without @JoinColumn(s)
Comment 1 Stefan Dimov CLA 2011-02-28 04:40:15 EST
Created attachment 189920 [details]
patch
Comment 2 Stefan Dimov CLA 2011-02-28 04:48:06 EST
Created attachment 189924 [details]
patch v2

Fixes 'non-externalized string' warnings
Comment 3 Stefan Dimov CLA 2011-02-28 06:14:22 EST
Patch committed ...
Comment 4 Jolene Moffitt CLA 2011-04-26 14:36:48 EDT
Verified in Build I-3.3.0-20110414085808

Verified checkbox appears in the properties. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0_M6