Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » QVTo correct map references
QVTo correct map references [message #1838846] Sat, 06 March 2021 11:00 Go to next message
Gabriele Cavallaro is currently offline Gabriele CavallaroFriend
Messages: 5
Registered: March 2021
Junior Member
Hi all.
As my other posts I want specify that I'm using this plugin
Trying to test mapping behaviour I found something of strange:
mapping Property :: Property2Property() : Property {
	result.name := self.name;
	result.type := self.type;
	result.visibility := self.visibility;
	result.lower := self.lower;
	result.upper := self.upper;
	result.association := self.association;
}

With this simple mapping, two of the property attribute, type and association are not correctly mapped, because types can refer to different objects, in particular, when they refer to an internal PrimitiveType of a model in the final mapping:
https://i.imgur.com/fxsq2cx.png
the mapping copy the reference from the old model leaving a pointer to an external model (the input model).
Exist a command to correct the mapping and make it select the internal objects?

Same happen for associations, but between Classes.

Thanks in advance for the future answers.
Re: QVTo correct map references [message #1838848 is a reply to message #1838846] Sat, 06 March 2021 13:27 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

You description and snippet of a repro gives me very little clue as to what you are doing or what you find unsatisfactory.

I can only observe that if you want to map X to Y you will need a mapping that converts X to Y.

Regards

Ed Willink
Re: QVTo correct map references [message #1838861 is a reply to message #1838848] Sun, 07 March 2021 01:11 Go to previous messageGo to next message
Gabriele Cavallaro is currently offline Gabriele CavallaroFriend
Messages: 5
Registered: March 2021
Junior Member
May I have to ask u sorry,
I'm new using this tool and my research of documentation about expected behaviours or mapping declaration
have only show me a lack of information about this topics,
this is why my questions are not precise, because I'm not sure of the result of this (example) transformation.

In this case for testing, I'm trying to map a model 1 to 1,
so create one transformation that produces an output model that's an exact copy of the original model.
What I try to show in the previous post is the result of part of this attempt,
what I found strange is that the type of one property, in case is a primitive type owned by the original/input model was not mapped,
from the screenshot is shown the list of primitive types available in the output model, they are all listed double; one time from the input model one time for the output model,
I understand that links of the primitive type was copy and not mapped.
So finally, my question is about how ask to the transformation to look in the produced/output model, if is possible make this links internal and cut off all not necessary references on the old model.
A paper with documentation about this will be nice too.
Thank you again for your time.
Re: QVTo correct map references [message #1838872 is a reply to message #1838861] Sun, 07 March 2021 15:35 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Most QVTo users learn by studying the SimpleUML2RDBMS example.

So long as you ask questions that may be meaningful to you but not to anyone else you are wasting everyone's time. I suggest you read https://wiki.eclipse.org/OCL/ForumNetiquette to see how to ask a question that is more likely to obtain a helpful response.

Regards

Ed Willink
Previous Topic:QVTo apply stereotype
Next Topic:Define infix arithmetic operations for a custom class
Goto Forum:
  


Current Time: Thu Apr 25 21:05:09 GMT 2024

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

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

Back to the top