Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344742 - Support for orm xml defined persistent types
Summary: Support for orm xml defined persistent types
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: Diagram Editor (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Petya Sabeva CLA
QA Contact: Stefan Dimov CLA
URL:
Whiteboard:
Keywords: plan
: 381435 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-04 13:39 EDT by Nan Li CLA
Modified: 2013-03-15 11:12 EDT (History)
3 users (show)

See Also:


Attachments
CCE Stack Trace (5.62 KB, text/plain)
2011-05-04 13:42 EDT, Nan Li CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Li CLA 2011-05-04 13:39:32 EDT
Build Identifier: I20110427-1300

If including an entity both in a mapping XML and a diagram, the java.lang.ClassCastException will be thrown when trying to open the diagram editor or save a changed diagram or... And the diagram editor cannot be opened at all.

The following steps can reproduce the problem:
1. Create an java entity
2. Open the diagram editor and add the java entity created in step 1 to it
3. Create a mapping file and add the java entity created in the step 1 to it
4. Go back to the diagram editor, make some changes to the diagram, and try to save it
5. Close the diagram editor by discard the changes
6. Try to open the diagram editor again

The stack trace is attached.

Reproducible: Always
Comment 1 Nan Li CLA 2011-05-04 13:42:00 EDT
Created attachment 194746 [details]
CCE Stack Trace
Comment 2 Stefan Dimov CLA 2011-05-04 19:00:56 EDT
Currently the JPA Diagram Editor supports pure Java entities only. 

http://wiki.eclipse.org/JPA_Diagram_Editor_Project#Limitations

We plan to support xml defined entities too in the future
Comment 3 Karen Butzke CLA 2012-04-05 14:09:53 EDT
Lowering the severity since the diagram editor doesn't support xml right now and there are no solid plans for this support.
Comment 4 Petya Sabeva CLA 2012-06-15 04:34:41 EDT
*** Bug 381435 has been marked as a duplicate of this bug. ***
Comment 5 Neil Hauge CLA 2012-09-27 13:52:23 EDT
Was just thinking that this case should probably be more gracefully handled for now.  Either don't allow the diagram editor to open, or have some sort of warning message displayed when it is open. 

At the current time I don't believe it is obvious to the user that there is a problem.
Comment 6 Petya Sabeva CLA 2013-03-15 08:41:30 EDT
I am changing the severity to enhancement, because manipulating of xml defined persistent types through the JPA diagram editor is a whole new feature, which wasn't supported till now. 

The code was submitting with the following git commit:

https://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=92ed2e9eb64fcb68d009c49df281f861cd18b0b7

There still needs to be added new SWT bot tests for this kind of persistent types.
Comment 7 Neil Hauge CLA 2013-03-15 11:03:00 EDT
This commit is in Kepler M6, so might make sense to just mark this as fixed for M6, and then open a new bug for the testing tasks in M7.  You may also want to adjust the title to more accurately reflect this feature.  No exception should be needed since it is already in M6.
Comment 8 Petya Sabeva CLA 2013-03-15 11:09:44 EDT
I've opened a new bug for the tests: https://bugs.eclipse.org/bugs/show_bug.cgi?id=403482
Comment 9 Petya Sabeva CLA 2013-03-15 11:10:34 EDT
I am closing this one.