Skip to content

Commit

Permalink
update model joins (#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
haroonsherjan committed Mar 14, 2024
1 parent 826a520 commit 5615055
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions showcases/data/End To End Examples/Integrate Mappings/code.pure
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Mapping com::entity::LegalEntityMapping

Mapping com::trade::TradeWithLegalEntityMapping
(
include dataspace com::entity::EntityDataspace
include dataspace com::entity::EntityDataSpace

com::trade::Trade[trade]: Relational
{
Expand All @@ -87,14 +87,19 @@ Mapping com::trade::TradeWithLegalEntityMapping


###DataSpace
DataSpace com::entity::EntityDataspace
DataSpace com::entity::EntityDataSpace
{
executionContexts:
[
{
name: 'default';
mapping: com::entity::LegalEntityMapping;
defaultRuntime: com::entity::EntityRuntime;
testData:
Reference
#{
com::entity::EntityData
}#;
}
];
defaultExecutionContext: 'default';
Expand Down Expand Up @@ -155,6 +160,28 @@ Runtime com::trade::TradeRuntime
];
}

SingleConnectionRuntime com::trade::AlternativeTradeRuntime
{
mappings:
[
com::trade::TradeWithLegalEntityMapping
];
connection: com::trade::TradeConnection;
}


###Data
Data com::entity::EntityData
{
Relational
#{
Entity.LegalEntity:
'ENTITY_ID,name\n'+
'abc,Entity1\n'+
'def,Entity2\n';
}#
}


###Service
Service com::trade::ServiceSimpleProject
Expand Down Expand Up @@ -199,12 +226,9 @@ Service com::trade::ServiceSimpleProject
'2,200,def\n';
}#,
com::trade::TradeConnection:
Relational
DataspaceTestData
#{
Entity.LegalEntity:
'ENTITY_ID,name\n'+
'abc,Entity1\n'+
'def,Entity2\n';
com::entity::EntityDataSpace
}#
]
]
Expand All @@ -230,4 +254,4 @@ Service com::trade::ServiceSimpleProject
]
}
]
}
}

0 comments on commit 5615055

Please sign in to comment.