Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358709 - resolveoneIn(...) fails for override mappings
Summary: resolveoneIn(...) fails for override mappings
Status: RESOLVED FIXED
Alias: None
Product: QVTo
Classification: Modeling
Component: Engine (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 398009
  Show dependency tree
 
Reported: 2011-09-23 07:44 EDT by Adrian Price CLA
Modified: 2013-03-19 05:26 EDT (History)
3 users (show)

See Also:


Attachments
Extension transformation (773 bytes, text/plain)
2011-09-23 08:31 EDT, Adrian Price CLA
no flags Details
Extension transformation launch configuration (1.40 KB, text/plain)
2011-09-23 08:33 EDT, Adrian Price CLA
no flags Details
JUnit test patch (3.92 KB, patch)
2012-10-22 05:37 EDT, Christopher Gerking CLA
no flags Details | Diff
Patch for resolveIn on overridden mappings (4.13 KB, patch)
2012-10-22 05:42 EDT, Christopher Gerking CLA
adolfosbh: iplog+
Details | Diff
JUnit test patch (3.96 KB, patch)
2012-11-16 13:52 EST, Christopher Gerking CLA
no flags Details | Diff
JUnit test patch (3.96 KB, patch)
2012-11-16 13:53 EST, Christopher Gerking CLA
adolfosbh: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Price CLA 2011-09-23 07:44:08 EDT
(org.eclipse.m2m.qvt.oml.runtime_3.1.0.v20110314-1530-7M6-DZRDKEJUKi6KlYD)
Comment 1 Adrian Price CLA 2011-09-23 07:53:23 EDT
Doh, premature submit. Here's the rest of the description:

If one transform extends a base transform, and the base transform calls resolveoneIn(mapping, type), where mapping has been overridden in the extension transform, resolveonIn does not yield the correct result.

I noticed this when experimenting with extension mappings for the Simpleuml_To_Rdb.qvto example. I have attached my extension transform, in which the override UML::Class::persistentClass2table() : RDB::Table mapping is identical to the base version. If you compare the results you will see that those produced by the extension lack the includedColumns attribute.
Comment 2 Adrian Price CLA 2011-09-23 08:31:32 EDT
Created attachment 203893 [details]
Extension transformation
Comment 3 Adrian Price CLA 2011-09-23 08:33:05 EDT
Created attachment 203894 [details]
Extension transformation launch configuration
Comment 4 Christopher Gerking CLA 2012-10-22 05:37:21 EDT
Created attachment 222626 [details]
JUnit test patch
Comment 5 Christopher Gerking CLA 2012-10-22 05:42:09 EDT
Created attachment 222627 [details]
Patch for resolveIn on overridden mappings

The problem was that on execution of resolve operations, the overriding mapping is simply not considered. Fixed by the proposed patch.
Comment 6 Christopher Gerking CLA 2012-11-16 13:52:31 EST
Created attachment 223669 [details]
JUnit test patch

Updated for javaless mode
Comment 7 Christopher Gerking CLA 2012-11-16 13:53:08 EST
Created attachment 223670 [details]
JUnit test patch

Updated for javaless mode
Comment 8 Adolfo Sanchez-Barbudo Herrera CLA 2013-01-24 07:34:07 EST
+1

Trivial comment (no action required, just for the future):
- when doing (overridingOper instanceof MappingOperation) the previous overridingOpen != null is not required.
Comment 9 Adolfo Sanchez-Barbudo Herrera CLA 2013-03-11 07:09:00 EDT
The following has been committed and pushed to master for M6:
- Bug fix patch with trivial change commented above.

Resolving as fixed.
Comment 10 Sergey Boyko CLA 2013-03-15 07:03:51 EDT
See also Bug 403440.
Comment 11 Philipp W. Kutter CLA 2013-03-19 01:41:39 EDT
What is missing to put this to verified?
Comment 12 Ed Willink CLA 2013-03-19 05:26:24 EDT
See my response on https://bugs.eclipse.org/bugs/show_bug.cgi?id=309762#c20.

Please do not waste our time by spamming Bugzillas. We have a developers mailing list (https://dev.eclipse.org/mailman/listinfo/qvto-dev) that is much more suitable for philosophiocal and project discussions.