Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315480 - Ability to open orm.xml file for target entity
Summary: Ability to open orm.xml file for target entity
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Nan Li CLA
QA Contact:
URL:
Whiteboard: EaseOfUse, fix_ready
Keywords: plan
Depends on:
Blocks:
 
Reported: 2010-06-02 16:03 EDT by Karen Butzke CLA
Modified: 2013-07-09 14:53 EDT (History)
2 users (show)

See Also:
neil.hauge: review+


Attachments
proposed patch (3.71 KB, patch)
2012-08-27 17:41 EDT, Nan Li CLA
neil.hauge: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2010-06-02 16:03:13 EDT
In the JPA Details view for a relationship mapping we currently have a link for the target-entity which takes you to the java editor.  We need a way for the user to get to the orm.xml/eclipselink-orm.xml file if that is where the mapping information is defined or overriden. Need to allow the user to pick or we could also make a guess and take them to the option that wins in overrides.
Comment 1 Karen Butzke CLA 2010-06-02 16:19:42 EDT
Along these sames lines we could have a way to go to the corresponding relationship mapping for a bi-directional mapping.  The ability to do this from within the java/xml editors would be nice as well, though I'm not sure yet how that would work.
Comment 2 Neil Hauge CLA 2011-07-01 16:26:42 EDT
Moving JPA specific bugs to new JPA component in bugzilla.
Comment 3 Karen Butzke CLA 2012-02-13 15:35:47 EST
This is potentially more important when we have dynamic persistence support where there is no java. Currently the Target Entity link will open the new class wizard. It should instead jump to the entity where it is defined elsewhere in the orm.xml file or in another orm.xml file.
Comment 4 Nan Li CLA 2012-08-27 17:41:45 EDT
Created attachment 220359 [details]
proposed patch

The patch works as the following:

- if the target entity is OrmPersistentType, open the mapping file containing the persistent type and then set the selection focus to that persistent type

- if the target entity is not OrmPersistentType, check if its corresponding Java type exists, if yes, open the Java type; otherwise, open the create new class wizard

Cases with validation errors, such as duplicates persistent types, are not handled with this patch thinking that's users' responsibility to fix the validation errors to get exactly what they want. There is a comment related to this in the patch. You can remove it if you think we don't need it.
Comment 5 Neil Hauge CLA 2013-07-09 14:52:06 EDT
Patch committed.