Bug 286222 - Incomplete type checking for collections in assignments
Summary: Incomplete type checking for collections in assignments
Status: RESOLVED FIXED
Alias: None
Product: QVTo
Classification: Modeling
Component: Engine (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Sergey Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-11 07:39 EDT by Sergey Boyko CLA
Modified: 2009-08-26 07:07 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Boyko CLA 2009-08-11 07:39:28 EDT
Start new platform with QVTO installed. Create 'SimpleUML to RDB' sample project.

Add the following mapping to the end of the script:

mapping UML::Class::class2viewColumns(targetClass: UML::Class) : OrderedSet(RDB::view::ViewColumn) {
    init {
    	var v := object RDB::view::ViewColumn {};
        result := self.map dataType2columns(targetClass)->
            union(self.map generalizations2columns(targetClass))->asOrderedSet()
    }   
}

No error is reported.
However it faces two problems.
1. Creation of abstract type 'RDB::view::ViewColumn' should be prohibited
2. Assignment of collection(RDB::TableColumn) to collection(RDB::view::ViewColumn) is also invalid
Comment 1 Sergey Boyko CLA 2009-08-14 05:31:27 EDT
Fixed in part of collection assignment checking.
Committed to HEAD and R2_0_maintenance branch.
Comment 2 Sergey Boyko CLA 2009-08-26 07:07:30 EDT
Abstract type instantiation checking is separate bug.