Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358709

Summary: resolveoneIn(...) fails for override mappings
Product: [Modeling] QVTo Reporter: Adrian Price <adrianp.quatinus>
Component: EngineAssignee: Project Inbox <mmt-qvt.operational-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ed, kutter, serg.boyko2011
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 398009    
Attachments:
Description Flags
Extension transformation
none
Extension transformation launch configuration
none
JUnit test patch
none
Patch for resolveIn on overridden mappings
adolfosbh: iplog+
JUnit test patch
none
JUnit test patch adolfosbh: iplog+

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.