[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] [QVTO] Question about intermediate properties

Hello everybody,

Although I have said in the subject the question is about intermediate properties, I'm not sure if it has to do with them or with OrderedSet assignments.

I have defined a intermediate property called nodesMainNav. This property is an Ordered Set of Nodes.

In the transformation entry point I'm trying to fill in the Ordered Set. For that, I executed a query named getMainNavigationArea, that returns an Area, and as an Area is composed of a set of Nodes, I use the relation nodes to extract all the nodes of the area. As it can be seen in the piece of code I show below.


intermediate property siteMap::nodesMainNav : OrderedSet(siteMap::Node);


main() { inModel.nodesMainNav := getMainNavigationArea().nodes; log('1..Num nodos',inModel.nodesMainNav->size()); inModel.rootObjects()[siteMap::Sitemap]->map toWebSite(); }

My problem is that the log sentence that appears as '1..Num nodos' shows the number of nodes in the OrderedSet is 0. However, I have written a similar log sentence inside the getMainNavigationArea query, and the result is that there are 8 nodes in the Area.

My question is: why does the OrderedSet seem to be without any nodes outside the query? Is this related to the intermediate property or is something related to the assignment?

Best regards,
	Toñi