eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[oclinecore] eKey can be serilaized as unparseable qualified name #1013

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 397917 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Jan 10, 2013 15:53 EDT | | Modified | May 27, 2014 09:52 EDT | | Reporter | Ed Willink |

Description

M4: The following serializes its keys as e.g Link::uuid which si a syntax error.

<?xml version="1.0" encoding="UTF-8"?>\ <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="test1" nsURI="http://test1/1.0" nsPrefix="test1">\

\ \ \ \ \ \ \ \ \ \ \ \ \ \
eclipse-ocl-bot commented 1 month ago

By Ed Willink on Jan 11, 2013 02:57

After deleting the qualification and saving, re-validation gives

"The key 'uuid : EString' must be feature of the reference's type test1.ecore /wfsTestModel/model Unknown EMF Problem"

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Jan 12, 2013 04:49

NB Ed Merks's comment:

"Note also that eKeys induce a constraint that the combination of the key attributes are unique in that reference, and they only affect serialization (by default) when they are defined on containment references, that's because it's the path from the root of the resource via containment references to the referenced object that's used in the fragment path, and it's those segments which use the key, rather than the index, to navigate to the appropriate child. That's why the place you defined the eKeys in your model had no visible effect, and could even be deterimental because any links referring to nodes in other resources would all expect those nodes to have unique uuid attributes but there's no constraint that says nodes in different resources can't have the same ID. "

It seems like there could be a useful editor validation warning of stupid usage.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Mar 01, 2013 14:37

Serialization and subsequent lookup fixed.

commit b790f98defa2bd97eda1a72ffcce57a2155b90f9

Pushed to master for M6.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2014 09:43

CLOSED after more than a year in RESOLVED state.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2014 09:52

and CLOSE