| Summary: | Deletion of Objects using EcoreUtil.delete() works wrong | ||
|---|---|---|---|
| Product: | [Modeling] EMFStore | Reporter: | Eugen Neufeld <eneufeld> |
| Component: | Common | Assignee: | Project Inbox <emfstore.common-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | eclipse, eneufeld, mkoegel |
| Version: | unspecified | ||
| Target Milestone: | 0.8.9.M921 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Eugen Neufeld
Hi Eugen, I just sent you a pull-request on github. It looks like the EObject itself remains on the root-level because only an EObjects references, such as the containment reference to the objects parent, is removed when deleting it. The problem is that an EObject is only considered deleted, if it is no longer connected to the containment tree at the end of a command. (We consider a command to represent a consistent set of changes to a model.) You could use a DeleteCommand or an AbstractCommand to persistently delete an EObject. However the bug you reported is of course valid and the framework should make it more clear if elements are removed without a command, therefore I open this bug to implement a warning: https://bugs.eclipse.org/bugs/show_bug.cgi?id=367101 I hope this helps. |