Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] Handling Referential Integrity


Ashely,

My standard answer to questions on the mailing list is to please ask the questions in the newsgroup instead.

Bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=61639 tracks this issue.  We do plan to fix it but just haven't had the time.

The way we plan to go about solving this is to use EcoreUtil.UsageCrossReferencer to find all uses of the deleted object and then to create commands to remove those uses too.


Ed Merks/Toronto/IBM@IBMCA
mailto: merks@xxxxxxxxxx
905-413-3265  (t/l 969)




"Ashley at Metamaxim" <ashley.mcneile@xxxxxxxxxxxxx>
Sent by: emf-dev-admin@xxxxxxxxxxx

09/16/2004 03:40 PM

Please respond to
emf-dev

To
<emf-dev@xxxxxxxxxxx>
cc
Subject
[emf-dev] Handling Referential Integrity





Hi
 
I am a new user of EMF, and am looking for information concerning handling referential integrity in EMF (specifically, in the editor that EMF generates for a model).
 
In April of this year, there was a posting to [news.eclipse.tools.emf] by Sugato Bagchi on this subject.
 
Ed Merks replied to Sugato with:
 
> The model knows nothing about delete; it's not a model concept.  In the editor,
> when you do delete, it just removes the object from its container making it
> unreachable.  It would be very nice for the framework to handle
> cleanup-all-references on delete automatically, wouldn't it?  Feel free to open
> a bugzilla feature request and we'll look into it (but it will take us quite
> some time probably).

 
In the application I am building with EMF, this lack of referential integrity is a problem. At present, if you delete an object in the generated editor, references to it remain intact. However if you then save and reload the model, the references disappear. I don't think that save and reload should cause this kind of change to the state of the model. What I need is for the references to be cleaned up at the time of the delete.
 
I have looked in the EMF bug/desired feature list, but this does not seem to registered as either a bug or a feature request. But maybe it is there, and I just did not look in the right place! What I need to know is:
 
1. Has this been registered as an issue, and are there any plans to fix it?
 
2. If not, where can I get an example of the code I would need to write to handle referential integrity myself?
 
With thanks
Ashley
 
Ashley McNeile
Metamaxim Ltd.
email:
ashley.mcneile@xxxxxxxxxxxxx
web:
www.metamaxim.com

Back to the top