Closed meuriceloup closed 4 years ago
and this is my TDL file:
import schema.xmi
import RelationalDatabase.tdl
import RelationalDatabase2.tdl
import DocumentDatabase.tdl
import dbTypes.tdl
containertype Docker
clustertype DockerCompose
platformtype localhost
platform platformName : localhost {
cluster clusterName : DockerCompose {
application Polystore {
container relationaldatabase1 : Docker {
deploys RelationalDatabase
ports {
target = 3306 ;
}
}
container relationaldatabase2 : Docker {
deploys RelationalDatabase2
ports {
target = 3306 ;
}
}
container documentdatabase : Docker {
deploys DocumentDatabase
ports {
target = 27017 ;
}
}
}
}
}
Hi, i don't understand the typhonML model. TyphonQL complains about products-products
, but the model has orders
. And also, I don't see use of opposite syntax. Can you explain?
Really sorry, after verification, the problem was the ML schema which does not represent what I wanted... I corrected the schema, replayed the scenario and everything was fine.
I close this issue.
Hi, This is my ML model:
As you can see, two different relational databases are defined: RelationalDatabase storing the Product entity and RelationalDatabase2 storing OrderProduct entity. An opposite relation is defined between both entities.
I encountered a problem while inserting an 'OrderProduct' with a reference to the related Product. This is my use case: 1) I inserted a new product:
insert Product {}
2) I then tried to insert a new orderproduct by referencing the previously inserted product:insert OrderProduct { products: #9ab3ce44-3300-4aa4-a187-a0372f6a8399}
Unfortunately the second insert statement returned this error:By observing the physical database structures within the two mariadb databases, I noticed two 'join' tables were created (one by database) in order to store the relations between orders and orderproducts. It seems that the QL server get mixed up with these join tables.