Search in sources :

Example 1 with Milestoning

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Milestoning in project legend-pure by finos.

the class TestMilestonedPropertyUsageInFunctionExpressions method testAllVersionsInRangePropertyUsageForCrossTemporal.

@ToFix
@Ignore
@Test
public void testAllVersionsInRangePropertyUsageForCrossTemporal() {
    runtime.createInMemorySource("test.pure", "import meta::test::milestoning::domain::*;\n" + "Class <<temporal.businesstemporal>> meta::test::milestoning::domain::Product{\n" + "   classification : Classification[*];\n" + "}\n" + "Class  <<temporal.processingtemporal>> meta::test::milestoning::domain::Classification{\n" + "   exchangeName : String[0..1];\n" + "}\n" + "function go():Any[*]\n" + "{\n" + "   {|Product.allVersionsInRange(%2018-1-1, %2018-1-9).classificationAllVersionsInRange(%2018-1-1, %2018-1-9)}\n" + "}\n");
    runtime.compile();
    runtime.modify("test.pure", "import meta::test::milestoning::domain::*;\n" + "Class <<temporal.bitemporal>> meta::test::milestoning::domain::Product{\n" + "   classification : Classification[*];\n" + "}\n" + "Class  <<temporal.businesstemporal>> meta::test::milestoning::domain::Classification{\n" + "   exchangeName : String[0..1];\n" + "}\n" + "function go():Any[*]\n" + "{\n" + "   {|Product.all(%2018-1-1, %2018-1-9).classificationAllVersionsInRange(%2018-1-1, %2018-1-9)}\n" + "}\n");
    runtime.compile();
    runtime.modify("test.pure", "import meta::test::milestoning::domain::*;\n" + "Class <<temporal.bitemporal>> meta::test::milestoning::domain::Product{\n" + "   classification : Classification[*];\n" + "}\n" + "Class  <<temporal.processingtemporal>> meta::test::milestoning::domain::Classification{\n" + "   exchangeName : String[0..1];\n" + "}\n" + "function go():Any[*]\n" + "{\n" + "   {|Product.all(%2018-1-1, %2018-1-9).classificationAllVersionsInRange(%2018-1-1, %2018-1-9)}\n" + "}\n");
    runtime.compile();
    runtime.modify("test.pure", "import meta::test::milestoning::domain::*;\n" + "Class <<temporal.businesstemporal>> meta::test::milestoning::domain::Product{\n" + "   classification : Classification[*];\n" + "}\n" + "Class  <<temporal.bitemporal>> meta::test::milestoning::domain::Classification{\n" + "   exchangeName : String[0..1];\n" + "}\n" + "function go():Any[*]\n" + "{\n" + "   {|Product.allVersionsInRange(%2018-1-1, %2018-1-9).classificationAllVersionsInRange(%2018-1-1, %2018-1-9)}\n" + "}\n");
    PureCompilationException e1 = Assert.assertThrows(PureCompilationException.class, runtime::compile);
    Assert.assertEquals("Compilation error at (resource:test.pure line:10 column:55), \"The system can't find a match for the function: classificationAllVersionsInRange(_:Product[1],_:StrictDate[1],_:StrictDate[1])", e1.getMessage());
    runtime.modify("test.pure", "import meta::test::milestoning::domain::*;\n" + "Class <<temporal.processingtemporal>> meta::test::milestoning::domain::Product{\n" + "   classification : Classification[*];\n" + "}\n" + "Class  <<temporal.bitemporal>> meta::test::milestoning::domain::Classification{\n" + "   exchangeName : String[0..1];\n" + "}\n" + "function go():Any[*]\n" + "{\n" + "   {|Product.allVersionsInRange(%2018-1-1, %2018-1-9).classificationAllVersionsInRange(%2018-1-1, %2018-1-9)}\n" + "}\n");
    PureCompilationException e2 = Assert.assertThrows(PureCompilationException.class, runtime::compile);
    Assert.assertEquals("Compilation error at (resource:test.pure line:10 column:55), \"The system can't find a match for the function: classificationAllVersionsInRange(_:Product[1],_:StrictDate[1],_:StrictDate[1])", e2.getMessage());
    runtime.modify("test.pure", "import meta::test::milestoning::domain::*;\n" + "Class <<temporal.processingtemporal>> meta::test::milestoning::domain::Product{\n" + "   classification : Classification[*];\n" + "}\n" + "Class  <<temporal.businesstemporal>> meta::test::milestoning::domain::Classification{\n" + "   exchangeName : String[0..1];\n" + "}\n" + "function go():Any[*]\n" + "{\n" + "   {|Product.allVersionsInRange(%2018-1-1, %2018-1-9).classificationAllVersionsInRange(%2018-1-1, %2018-1-9)}\n" + "}\n");
    runtime.compile();
}
Also used : PureCompilationException(org.finos.legend.pure.m4.exception.PureCompilationException) Ignore(org.junit.Ignore) Test(org.junit.Test) ToFix(org.finos.legend.pure.m3.tools.test.ToFix)

Example 2 with Milestoning

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Milestoning in project legend-pure by finos.

the class TestSimpleGrammar method testTableWithBusinessSnapshotMilestoning.

@Test
public void testTableWithBusinessSnapshotMilestoning() {
    this.runtime.createInMemorySource("test.pure", "###Relational\n" + "Database pack::ProductDatabase (\n" + "   Table ProductTable\n" + "   (\n" + "       milestoning( \n" + "          business(BUS_SNAPSHOT_DATE = snapshotDate)\n" + "       )" + "       id INT PRIMARY KEY,\n" + "       name VARCHAR(200),\n" + "       snapshotDate Date\n" + "   )\n" + ")\n");
    this.runtime.compile();
    Database productDatabase = (Database) this.runtime.getCoreInstance("pack::ProductDatabase");
    RichIterable<? extends Milestoning> milestonings = productDatabase._schemas().getFirst()._tables().getFirst()._milestoning().selectInstancesOf(BusinessSnapshotMilestoning.class);
    Assert.assertEquals(1, milestonings.size());
    Assert.assertTrue(milestonings.getFirst() instanceof BusinessSnapshotMilestoning);
    BusinessSnapshotMilestoning businessSnapshotMilestoning = (BusinessSnapshotMilestoning) milestonings.getFirst();
    Assert.assertEquals("snapshotDate", businessSnapshotMilestoning._snapshotDate()._name());
    Assert.assertNull(businessSnapshotMilestoning._infinityDate());
}
Also used : BusinessSnapshotMilestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.BusinessSnapshotMilestoning) Database(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Database) Test(org.junit.Test)

Example 3 with Milestoning

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Milestoning in project legend-pure by finos.

the class TestSimpleGrammar method testMappingScope.

@Test
public void testMappingScope() {
    Loader.parseM3("import other::*;\n" + "\n" + "Class other::Person\n" + "{\n" + "    name : String[1];\n" + "    id : Integer[1];" + "    other : String[1];" + "}\n" + "###Relational\n" + "Database mapping::pack::db" + "(" + "    Table employeeTable\n" + "    (\n" + "        id INT PRIMARY KEY,\n" + "        name VARCHAR(200),\n" + "        other VARCHAR(200),\n" + "        firmId INT\n" + "    )" + ")\n" + "###Mapping\n" + "import mapping::pack::*;\n" + "Mapping mappingPackage::myMapping\n" + "(\n" + " /* comment */\n" + "    other::Person: Relational\n" + "            {" + "                scope([db])" + "                (" + "                    name : employeeTable.name\n" + "                )," + "                scope([db]default.employeeTable)" + "                (" + "                    id : id" + "                )," + "                scope([db]employeeTable)" + "                (" + "                    other : other" + "                )" + "            }\n" + ")\n", this.repository, new ParserLibrary(Lists.immutable.with(new M3AntlrParser(), new MappingParser(), new RelationalParser())), ValidationType.DEEP, VoidM3M4StateListener.VOID_M3_M4_STATE_LISTENER, this.context);
    this.runtime.compile();
    CoreInstance mapping = this.runtime.getCoreInstance("mappingPackage::myMapping");
    CoreInstance personClassMappingImplementation = Instance.getValueForMetaPropertyToManyResolved(mapping, "classMappings", this.processorSupport).getFirst();
    ListIterable<? extends CoreInstance> personClassMappingImplementationPropertyMappings = Instance.getValueForMetaPropertyToManyResolved(personClassMappingImplementation, "propertyMappings", this.processorSupport);
    final StringBuilder sb = new StringBuilder("[\n");
    personClassMappingImplementationPropertyMappings.forEach(new Procedure<CoreInstance>() {

        @Override
        public void value(CoreInstance each) {
            CoreInstance relationalOperationElement = Instance.getValueForMetaPropertyToOneResolved(each, "relationalOperationElement", TestSimpleGrammar.this.processorSupport);
            Printer.print(sb, relationalOperationElement, 3);
            sb.append("\n");
        }
    });
    final String mappingGraphDump = sb.append("]").toString();
    Assert.assertEquals("[\n" + "Anonymous_StripedId instance TableAliasColumn\n" + "    alias(Property):\n" + "        Anonymous_StripedId instance TableAlias\n" + "            database(Property):\n" + "                [~>] db instance Database\n" + "            name(Property):\n" + "                employeeTable instance String\n" + "            relationalElement(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "    column(Property):\n" + "        Anonymous_StripedId instance Column\n" + "            name(Property):\n" + "                name instance String\n" + "            nullable(Property):\n" + "                true instance Boolean\n" + "            owner(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "            type(Property):\n" + "                Anonymous_StripedId instance Varchar\n" + "                    size(Property):\n" + "                        200 instance Integer\n" + "    columnName(Property):\n" + "        name instance String\n" + "    setMappingOwner(Property):\n" + "        Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "            class(Property):\n" + "                [~>] other::Person instance Class\n" + "            distinct(Property):\n" + "                false instance Boolean\n" + "            id(Property):\n" + "                other_Person instance String\n" + "            mainTableAlias(Property):\n" + "                Anonymous_StripedId instance TableAlias\n" + "                    database(Property):\n" + "                        [X] db instance Database\n" + "                    name(Property):\n" + "                         instance String\n" + "                    relationalElement(Property):\n" + "                        Anonymous_StripedId instance Table\n" + "                            columns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            milestoning(Property):\n" + "                            name(Property):\n" + "                                [>3] employeeTable instance String\n" + "                            primaryKey(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            schema(Property):\n" + "                                [>3] Anonymous_StripedId instance Schema\n" + "                            setColumns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            temporaryTable(Property):\n" + "                                [>3] false instance Boolean\n" + "            parent(Property):\n" + "                [~>] mappingPackage::myMapping instance Mapping\n" + "            primaryKey(Property):\n" + "                Anonymous_StripedId instance TableAliasColumn\n" + "                    alias(Property):\n" + "                        Anonymous_StripedId instance TableAlias\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3]  instance String\n" + "                            relationalElement(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                    column(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "            propertyMappings(Property):\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        name instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        [_] Anonymous_StripedId instance TableAliasColumn\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        id instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] id instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        other instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] other instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "            root(Property):\n" + "                true instance Boolean\n" + "            stores(Property):\n" + "                [X] db instance Database\n" + "            userDefinedPrimaryKey(Property):\n" + "                false instance Boolean\n" + "Anonymous_StripedId instance TableAliasColumn\n" + "    alias(Property):\n" + "        Anonymous_StripedId instance TableAlias\n" + "            database(Property):\n" + "                [~>] db instance Database\n" + "            name(Property):\n" + "                employeeTable instance String\n" + "            relationalElement(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "            schema(Property):\n" + "                default instance String\n" + "    column(Property):\n" + "        Anonymous_StripedId instance Column\n" + "            name(Property):\n" + "                id instance String\n" + "            nullable(Property):\n" + "                false instance Boolean\n" + "            owner(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "            type(Property):\n" + "                Anonymous_StripedId instance Integer\n" + "    columnName(Property):\n" + "        id instance String\n" + "    setMappingOwner(Property):\n" + "        Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "            class(Property):\n" + "                [~>] other::Person instance Class\n" + "            distinct(Property):\n" + "                false instance Boolean\n" + "            id(Property):\n" + "                other_Person instance String\n" + "            mainTableAlias(Property):\n" + "                Anonymous_StripedId instance TableAlias\n" + "                    database(Property):\n" + "                        [X] db instance Database\n" + "                    name(Property):\n" + "                         instance String\n" + "                    relationalElement(Property):\n" + "                        Anonymous_StripedId instance Table\n" + "                            columns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            milestoning(Property):\n" + "                            name(Property):\n" + "                                [>3] employeeTable instance String\n" + "                            primaryKey(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            schema(Property):\n" + "                                [>3] Anonymous_StripedId instance Schema\n" + "                            setColumns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            temporaryTable(Property):\n" + "                                [>3] false instance Boolean\n" + "            parent(Property):\n" + "                [~>] mappingPackage::myMapping instance Mapping\n" + "            primaryKey(Property):\n" + "                Anonymous_StripedId instance TableAliasColumn\n" + "                    alias(Property):\n" + "                        Anonymous_StripedId instance TableAlias\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3]  instance String\n" + "                            relationalElement(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                    column(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "            propertyMappings(Property):\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        name instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] name instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        id instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        [_] Anonymous_StripedId instance TableAliasColumn\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        other instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] other instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "            root(Property):\n" + "                true instance Boolean\n" + "            stores(Property):\n" + "                [X] db instance Database\n" + "            userDefinedPrimaryKey(Property):\n" + "                false instance Boolean\n" + "Anonymous_StripedId instance TableAliasColumn\n" + "    alias(Property):\n" + "        Anonymous_StripedId instance TableAlias\n" + "            database(Property):\n" + "                [~>] db instance Database\n" + "            name(Property):\n" + "                employeeTable instance String\n" + "            relationalElement(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "    column(Property):\n" + "        Anonymous_StripedId instance Column\n" + "            name(Property):\n" + "                other instance String\n" + "            nullable(Property):\n" + "                true instance Boolean\n" + "            owner(Property):\n" + "                Anonymous_StripedId instance Table\n" + "                    columns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    milestoning(Property):\n" + "                    name(Property):\n" + "                        employeeTable instance String\n" + "                    primaryKey(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    schema(Property):\n" + "                        Anonymous_StripedId instance Schema\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3] default instance String\n" + "                            relations(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            tables(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            views(Property):\n" + "                    setColumns(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Varchar\n" + "                        [_] Anonymous_StripedId instance Column\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] firmId instance String\n" + "                            nullable(Property):\n" + "                                [>3] true instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "                    temporaryTable(Property):\n" + "                        false instance Boolean\n" + "            type(Property):\n" + "                Anonymous_StripedId instance Varchar\n" + "                    size(Property):\n" + "                        200 instance Integer\n" + "    columnName(Property):\n" + "        other instance String\n" + "    setMappingOwner(Property):\n" + "        Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "            class(Property):\n" + "                [~>] other::Person instance Class\n" + "            distinct(Property):\n" + "                false instance Boolean\n" + "            id(Property):\n" + "                other_Person instance String\n" + "            mainTableAlias(Property):\n" + "                Anonymous_StripedId instance TableAlias\n" + "                    database(Property):\n" + "                        [X] db instance Database\n" + "                    name(Property):\n" + "                         instance String\n" + "                    relationalElement(Property):\n" + "                        Anonymous_StripedId instance Table\n" + "                            columns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            milestoning(Property):\n" + "                            name(Property):\n" + "                                [>3] employeeTable instance String\n" + "                            primaryKey(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            schema(Property):\n" + "                                [>3] Anonymous_StripedId instance Schema\n" + "                            setColumns(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            temporaryTable(Property):\n" + "                                [>3] false instance Boolean\n" + "            parent(Property):\n" + "                [~>] mappingPackage::myMapping instance Mapping\n" + "            primaryKey(Property):\n" + "                Anonymous_StripedId instance TableAliasColumn\n" + "                    alias(Property):\n" + "                        Anonymous_StripedId instance TableAlias\n" + "                            database(Property):\n" + "                                [X] db instance Database\n" + "                            name(Property):\n" + "                                [>3]  instance String\n" + "                            relationalElement(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                    column(Property):\n" + "                        Anonymous_StripedId instance Column\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            nullable(Property):\n" + "                                [>3] false instance Boolean\n" + "                            owner(Property):\n" + "                                [>3] Anonymous_StripedId instance Table\n" + "                            type(Property):\n" + "                                [>3] Anonymous_StripedId instance Integer\n" + "            propertyMappings(Property):\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        name instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] name instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] name instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        id instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] id instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        Anonymous_StripedId instance TableAliasColumn\n" + "                            alias(Property):\n" + "                                [>3] Anonymous_StripedId instance TableAlias\n" + "                            column(Property):\n" + "                                [>3] Anonymous_StripedId instance Column\n" + "                            columnName(Property):\n" + "                                [>3] id instance String\n" + "                            setMappingOwner(Property):\n" + "                                [>3] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "                Anonymous_StripedId instance RelationalPropertyMapping\n" + "                    localMappingProperty(Property):\n" + "                        false instance Boolean\n" + "                    owner(Property):\n" + "                        [_] Anonymous_StripedId instance RootRelationalInstanceSetImplementation\n" + "                    property(Property):\n" + "                        other instance Property\n" + "                            aggregation(Property):\n" + "                                [>3] None instance AggregationKind\n" + "                            classifierGenericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            genericType(Property):\n" + "                                [>3] Anonymous_StripedId instance GenericType\n" + "                            multiplicity(Property):\n" + "                                [X] PureOne instance PackageableMultiplicity\n" + "                            name(Property):\n" + "                                [>3] other instance String\n" + "                            owner(Property):\n" + "                                [X] Person instance Class\n" + "                            referenceUsages(Property):\n" + "                                [>3] Anonymous_StripedId instance ReferenceUsage\n" + "                    relationalOperationElement(Property):\n" + "                        [_] Anonymous_StripedId instance TableAliasColumn\n" + "                    sourceSetImplementationId(Property):\n" + "                        other_Person instance String\n" + "                    targetSetImplementationId(Property):\n" + "                         instance String\n" + "            root(Property):\n" + "                true instance Boolean\n" + "            stores(Property):\n" + "                [X] db instance Database\n" + "            userDefinedPrimaryKey(Property):\n" + "                false instance Boolean\n" + "]", mappingGraphDump);
}
Also used : EnumerationMappingParser(org.finos.legend.pure.m2.dsl.mapping.serialization.grammar.v1.EnumerationMappingParser) MappingParser(org.finos.legend.pure.m2.dsl.mapping.serialization.grammar.v1.MappingParser) ParserLibrary(org.finos.legend.pure.m3.serialization.grammar.ParserLibrary) M3AntlrParser(org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3AntlrParser) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) RelationalParser(org.finos.legend.pure.m2.relational.serialization.grammar.v1.RelationalParser) Test(org.junit.Test)

Example 4 with Milestoning

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Milestoning in project legend-pure by finos.

the class TestMilestoningPropertyMapping method testProcessingMilestoningPropertyMapping.

@Test
public void testProcessingMilestoningPropertyMapping() {
    this.runtime.createInMemorySource(MODEL_ID, PROCESSING_MILESTONING_MODEL_CODE);
    this.runtime.createInMemorySource(STORE_ID, MILESTONED_STORE_CODE);
    this.runtime.createInMemorySource(MAPPING_ID, MAPPING_CODE);
    this.runtime.compile();
    Mapping mapping = (Mapping) this.runtime.getCoreInstance("milestoning::Amap");
    RootRelationalInstanceSetImplementation rootRelationalInstanceSetImplementation = mapping._classMappings().selectInstancesOf(RootRelationalInstanceSetImplementation.class).getFirst();
    EmbeddedRelationalInstanceSetImplementation milestoningEmbeddedRelationalInstance = (EmbeddedRelationalInstanceSetImplementation) rootRelationalInstanceSetImplementation._propertyMappings().detectWith(MILESTONING_PROPERTY_MAPPING, this.processorSupport);
    Assert.assertNotNull(milestoningEmbeddedRelationalInstance);
    validateProperty(milestoningEmbeddedRelationalInstance._property(), "milestoning", "milestoning::A");
    MutableList<RelationalPropertyMapping> relationalPropertyMappings = (MutableList<RelationalPropertyMapping>) milestoningEmbeddedRelationalInstance._propertyMappings().toList();
    Assert.assertEquals(2, relationalPropertyMappings.size());
    RelationalPropertyMapping inPropertyMapping = relationalPropertyMappings.get(0);
    validateProperty(inPropertyMapping._property(), "in", "meta::pure::milestoning::ProcessingDateMilestoning");
    validateTableAliasColumn(inPropertyMapping._relationalOperationElement(), "in_z");
    RelationalPropertyMapping outPropertyMapping = relationalPropertyMappings.get(1);
    validateProperty(outPropertyMapping._property(), "out", "meta::pure::milestoning::ProcessingDateMilestoning");
    validateTableAliasColumn(outPropertyMapping._relationalOperationElement(), "out_z");
}
Also used : EmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.EmbeddedRelationalInstanceSetImplementation) RelationalPropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping) MutableList(org.eclipse.collections.api.list.MutableList) RootRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RootRelationalInstanceSetImplementation) PropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMapping) Mapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping) RelationalPropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping) Test(org.junit.Test)

Example 5 with Milestoning

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Milestoning in project legend-pure by finos.

the class TestMilestoningPropertyMapping method testBusinessMilestoningPropertyMappingForTemporalEmbedded.

@Test
public void testBusinessMilestoningPropertyMappingForTemporalEmbedded() {
    this.runtime.createInMemorySource(MODEL_ID, BUSINESS_MILESTONING_MODEL_CODE);
    this.runtime.createInMemorySource(EMBEDDED_MODEL_ID, TEMPORAL_EMBEDDED_MODEL_CODE);
    this.runtime.createInMemorySource(STORE_ID, MILESTONED_STORE_CODE);
    this.runtime.createInMemorySource(MAPPING_ID, EMBEDDED_MAPPING_CODE);
    this.runtime.compile();
    Mapping mapping = (Mapping) this.runtime.getCoreInstance("milestoning::Bmap");
    RootRelationalInstanceSetImplementation rootRelationalInstance = mapping._classMappings().selectInstancesOf(RootRelationalInstanceSetImplementation.class).getFirst();
    EmbeddedRelationalInstanceSetImplementation milestoningEmbeddedRelationalInstance = (EmbeddedRelationalInstanceSetImplementation) rootRelationalInstance._propertyMappings().detectWith(MILESTONING_PROPERTY_MAPPING, this.processorSupport);
    Assert.assertNotNull(milestoningEmbeddedRelationalInstance);
    validateProperty(milestoningEmbeddedRelationalInstance._property(), "milestoning", "milestoning::B");
    MutableList<RelationalPropertyMapping> relationalPropertyMappings = (MutableList<RelationalPropertyMapping>) milestoningEmbeddedRelationalInstance._propertyMappings().toList();
    Assert.assertEquals(2, relationalPropertyMappings.size());
    RelationalPropertyMapping fromPropertyMapping = relationalPropertyMappings.get(0);
    validateProperty(fromPropertyMapping._property(), "from", "meta::pure::milestoning::BusinessDateMilestoning");
    validateTableAliasColumn(fromPropertyMapping._relationalOperationElement(), "from_z");
    RelationalPropertyMapping thruPropertyMapping = relationalPropertyMappings.get(1);
    validateProperty(thruPropertyMapping._property(), "thru", "meta::pure::milestoning::BusinessDateMilestoning");
    validateTableAliasColumn(thruPropertyMapping._relationalOperationElement(), "thru_z");
    EmbeddedRelationalInstanceSetImplementation embeddedRelationalInstance = rootRelationalInstance._propertyMappings().selectInstancesOf(EmbeddedRelationalInstanceSetImplementation.class).getFirst();
    milestoningEmbeddedRelationalInstance = (EmbeddedRelationalInstanceSetImplementation) embeddedRelationalInstance._propertyMappings().detectWith(MILESTONING_PROPERTY_MAPPING, this.processorSupport);
    Assert.assertNotNull(milestoningEmbeddedRelationalInstance);
    validateProperty(milestoningEmbeddedRelationalInstance._property(), "milestoning", "milestoning::A");
    relationalPropertyMappings = (MutableList<RelationalPropertyMapping>) milestoningEmbeddedRelationalInstance._propertyMappings().toList();
    Assert.assertEquals(2, relationalPropertyMappings.size());
    fromPropertyMapping = relationalPropertyMappings.get(0);
    validateProperty(fromPropertyMapping._property(), "from", "meta::pure::milestoning::BusinessDateMilestoning");
    validateTableAliasColumn(fromPropertyMapping._relationalOperationElement(), "from_z");
    thruPropertyMapping = relationalPropertyMappings.get(1);
    validateProperty(thruPropertyMapping._property(), "thru", "meta::pure::milestoning::BusinessDateMilestoning");
    validateTableAliasColumn(thruPropertyMapping._relationalOperationElement(), "thru_z");
}
Also used : EmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.EmbeddedRelationalInstanceSetImplementation) RelationalPropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping) MutableList(org.eclipse.collections.api.list.MutableList) RootRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RootRelationalInstanceSetImplementation) PropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMapping) Mapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping) RelationalPropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)19 MutableList (org.eclipse.collections.api.list.MutableList)12 PropertyMapping (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMapping)12 EmbeddedRelationalInstanceSetImplementation (org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.EmbeddedRelationalInstanceSetImplementation)12 RelationalPropertyMapping (org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping)12 RootRelationalInstanceSetImplementation (org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RootRelationalInstanceSetImplementation)12 Mapping (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping)11 RuntimeTestScriptBuilder (org.finos.legend.pure.m3.RuntimeTestScriptBuilder)5 PureCompilationException (org.finos.legend.pure.m4.exception.PureCompilationException)5 CoreInstance (org.finos.legend.pure.m4.coreinstance.CoreInstance)4 List (java.util.List)1 Token (org.antlr.v4.runtime.Token)1 Interval (org.antlr.v4.runtime.misc.Interval)1 RichIterable (org.eclipse.collections.api.RichIterable)1 MutableSet (org.eclipse.collections.api.set.MutableSet)1 Pair (org.eclipse.collections.api.tuple.Pair)1 FastList (org.eclipse.collections.impl.list.mutable.FastList)1 Tuples (org.eclipse.collections.impl.tuple.Tuples)1 EnumerationMappingParser (org.finos.legend.pure.m2.dsl.mapping.serialization.grammar.v1.EnumerationMappingParser)1 MappingParser (org.finos.legend.pure.m2.dsl.mapping.serialization.grammar.v1.MappingParser)1