ModelComparison

This concept implements an generic way of comparing EDM data models. This process is as follows:

 

  1. A method is implemented to modify the actual Express schema is done as follows:
    1. The schema name is changed to the new "given" name. All string literals in the schema,containing the original schema name will be substituted with the new given schema name.
    2. All root entities, i.e., all entities that have no super types will be updated with the attribute "INTEGER_GUID : INTEGER" as the first Explicit attribute.
    3. All Entity constructors of all root entities will be updated with the argument of the added INTEGER_GUID attribute.
  2. Populate a model of the comparison modified schema from a model of the original schema. This population is a CopyModel plus updating all INTEGER_GUID attributes with it's own instanceId.
  3. Use the ComparisonModified model as input to your process, and create an resulting model without touching/changing the value of any INTEGER_GUID attributes. An example of such "your process" is populate a P26 file from the ComparisonModified model and then make a new ComparisonModel by importing the p26 file.
  4. The ComparisonModelComparison can be used to compare two models of the actual ComparisonModified schema,i.e, the result of a P26 file import can be compared with the model used for P26 export.

 

The result of this "schema modification for comparison" will be a new Express source file that can be compiled in a normal way. It is expected that the number of errors/warning are exactly the same as for the original schema.

   "Errors in expressions" does not have any effect on the model comparison operation.

Currently the system will fail when an entity constructor of a root entity "spans" more than one source line. An easy fix to this, is to remove such "line breaks" before "modifying the schema for comparison"