Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042165
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] Y. DBSourceManagerminorhave not tried2019-10-31 10:052022-02-01 08:07
ReporterAugustoMauchView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0042165: DBSM.assertExportIsConsistent works only with databases with only one first-level object

DescriptionThe DbsmTest.assertExportIsConsistent method only works properly only when the model contains only one first-level component (i.e. one function, one table (which may contain several columns, indexes, etc)).

It is not suitable for other simple models (i.e. one that has a materialized view, because it contains two first-level models, the materialized view and the table it gets data from).

When checking if each component has been exported consistently, it should extract from the XML model only the part relevant to the component being asserted.

For instance, in a model that contains both a table and a materialized view, to check if the table has been consistently exported the following comparison is done:

<?xml version="1.0" encoding="UTF-8"?>
<database name="TABLE TEST">
   <table name="TEST" primaryKey="TEST_ID">
      <column name="TEST_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default />
         <onCreateDefault />
      </column>
      <column name="COL1" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default />
         <onCreateDefault />
      </column>
      <column name="COL2" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default />
         <onCreateDefault />
      </column>
   </table>
</database>

<?xml version="1.0" encoding="UTF-8"?>
<database name="TABLE TEST">
   <table name="TEST" primaryKey="TEST_ID">
      <column name="TEST_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default />
         <onCreateDefault />
      </column>
      <column name="COL1" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default />
         <onCreateDefault />
      </column>
      <column name="COL2" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default />
         <onCreateDefault />
      </column>
   </table>
   <materializedView name="TEST_MATERIALIZEDVIEW">
      <![CDATA[SELECT t.col1 AS matviewcol FROM test t]]>
      <column name="MATVIEWCOL" primaryKey="false" required="false" type="OTHER" autoIncrement="false">
         <default />
         <onCreateDefault />
      </column>
   </materializedView>
</database>

The assertion fails, because the whole model is being compared with the exported object, instead of picking only the table element.
Steps To Reproduce- In the MaterializedViews class, try to use assertExportIsConsistent instead of assertExportedMaterializedView.
- All tests will fail
Proposed SolutionExtract from the model only the part relevant with the database object being asserted
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-10-31 10:05 AugustoMauch New Issue
2019-10-31 10:05 AugustoMauch Assigned To => platform
2019-10-31 10:05 AugustoMauch Modules => Core
2019-10-31 10:05 AugustoMauch Triggers an Emergency Pack => No
2019-10-31 10:14 alostale Type defect => design defect
2022-02-01 08:07 alostale Assigned To platform => Triage Platform Base


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker