Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFStore] customizing date equality
[EMFStore] customizing date equality [message #1192503] Sun, 17 November 2013 11:06 Go to next message
Eclipse UserFriend
My application uses a custom Date class and when two EMFStore clients
attempt to commit the same date to the same EAttribute in the same
EObject, EMFStore sees it as a conflict. See the attached screenshot.

I thought it would work find, because my custom Date class implements

public boolean equals(Object obj) {}

How does EMFStore determine whether there is a conflict between two
attributes?

$cott
Re: [EMFStore] customizing date equality [message #1194042 is a reply to message #1192503] Mon, 18 November 2013 04:59 Go to previous message
Eclipse UserFriend
Hi Scott,

I'm afraid I need to speak a bit more verbosely on this :)
The conflict detection of EMFStore basically works by recording all
changes via operations.
When a client with local changes has an update pending, conflict
resolution will fetch the remote changes and will read both the incoming
as well as the local operations. Out of these operations the conflict
detection will make reservations for each model element that has been
modified by an operation. A reservation has the form: ID of the model
element, feature name and in case of references potentially opposites.
What happens in your case now is, that a conflict is created because
there is an incoming as well as a local change that both
make the same reservation (the syncDate attribute), therefore EMFStore
decides that a conflict must exist. What is missing here, is a
fine-grained resolution of the conflict, i.e. we would need to look at
the conflict and check all involved operations. If we see that both
operations come to the same result, we would be able to neglect the
conflict. But this ain't currently the case.

Essentially we had this working in the past before refactoring the whole
conflict detection/resolution mechanism, but it seems to have got lost.
I therefore opened up a ticket to address the issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=421947
It think we can solve this for 1.1 together with some other changes
which are relevant for you (Bug 421417: SaveStateChangeObserver part of
API, Bug 421944: command stack notifications issue). Meanwhile you may
want to update to 1.0.3 which should fix the issue of not being able to
share a project that has its contents in an external resource.

Cheers,
Edgar

> My application uses a custom Date class and when two EMFStore clients
> attempt to commit the same date to the same EAttribute in the same
> EObject, EMFStore sees it as a conflict. See the attached screenshot.
>
> I thought it would work find, because my custom Date class implements
>
> public boolean equals(Object obj) {}
>
> How does EMFStore determine whether there is a conflict between two
> attributes?
>
> $cott
>

--
Edgar Mueller

Get Professional Eclipse Support: http://eclipsesource.com/munich
Previous Topic:[Texo] overwrite @CollectionTable with the ORM file
Next Topic:EMFStore or (and) CDO
Goto Forum:
  


Current Time: Thu Jul 10 19:29:43 EDT 2025

Powered by FUDForum. Page generated in 0.03709 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top