Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1260723

Summary: Copying Model problem
Product: [JBoss] JBoss Data Virtualization 6 Reporter: skaleta <skaleta>
Component: ToolingAssignee: Barry LaFond <blafond>
Status: CLOSED DEFERRED QA Contact: Matus Makovy <mmakovy>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: asaji, atangrin, blafond, vhalbert
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-05 10:32:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
zip with tested project and pictures of bugs none

Description skaleta 2015-09-07 14:07:19 UTC
Created attachment 1071037 [details]
zip with tested project and pictures of bugs

Description:
When creating new view model by copying from existing model (see steps to reproduce), two bugs occurs.

First: 
In Transformation Diagram of model's procedures, name of model is not updated.
(see CopyModelProcedureSQL.png in attachement.zip)
In this case "Products_view.PRODUCTDATA.NAME" should be updated to 
"<new_model_name>.PRODUCTDATA.NAME", otherwise it produce validation error.

Additionally:
If location of new model is different from existing model (different folder or project), import declarations to source model will be added as following:
1. import declaration to source model is added (in this case: /Dataroles/sources/Products_source.xmi)
2. concurrently, another import declaration (with name: Model Import) with error (Unable to resolve the imported model ../sources/Products_source.xmi) is added.
(see CopyModelImports.png in attachement.zip)

Steps to Reproduce:
1. import attached project (TestedProject.zip in attachement.zip)
2. right-click on project and select New > Teiid Metadata Model
3. set new name and select Relational Model Class, View Model Type, Module Builder: "Copy from existing model of the same model class" and click Next >
4. browse for existing: <ImportedProjectName>/views/Products_view.xmi and click OK and Finish
5. new model will be created

Comment 1 skaleta 2015-09-09 13:09:52 UTC
Using Save As Model (double-click model - File->Save as.. - new location and name) causes same error in Transformation Diagram of model's procedures. (Import declarations are correct it this case)

Comment 2 Barry LaFond 2015-09-10 18:57:34 UTC
pushing to next DV 6.3 Tooling

Comment 3 JBoss JIRA Server 2016-01-04 13:02:58 UTC
Paul Richardson <p.g.richardson.uk> updated the status of jira TEIIDDES-2641 to Resolved

Comment 4 Matus Makovy 2016-02-05 10:32:50 UTC
Closing this since we are tracking issues for tooling only in JIRA from now on.

Comment 5 JBoss JIRA Server 2016-02-22 15:19:45 UTC
stanislav kaleta <skaleta> updated the status of jira TEIIDDES-2641 to Closed

Comment 6 JBoss JIRA Server 2016-04-14 18:38:51 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2641 to Reopened

Comment 7 JBoss JIRA Server 2016-04-14 18:49:09 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2641 to Closed