You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
entity Product {
id : String
orders -> Order[0..*]
}
entity Order {
id : String
products -> Product."Product.orders"[1]
}
documentdb DocumentDatabase {
collections {
Order : Order
Product : Product
}
}
Once deployed, I executed this insert statement: insert Product {id: "p2", orders: [Order {id: "o2"}, Order {id: "o3"}]}
the query finished with success but not sure it did what it was supposed to do...
Indeed, I connected my MongoDB database to take a look at the physical structures and the inserted data. This is what I noticed:
the two orders were successfully inserted (see screenshot)
product 'p2' was also inserted BUT this product is linked to only one order , i.e., o3 (see screenshot)
The problem seems to be due to the fact that field 'Product.orders' is defined as String field and not as an array of strings...
The text was updated successfully, but these errors were encountered:
Hi,
This is the deployed TML schema:
Once deployed, I executed this insert statement:
insert Product {id: "p2", orders: [Order {id: "o2"}, Order {id: "o3"}]}
the query finished with success but not sure it did what it was supposed to do...
Indeed, I connected my MongoDB database to take a look at the physical structures and the inserted data. This is what I noticed:
the two orders were successfully inserted (see screenshot)
product 'p2' was also inserted BUT this product is linked to only one order , i.e., o3 (see screenshot)
The problem seems to be due to the fact that field 'Product.orders' is defined as String field and not as an array of strings...
The text was updated successfully, but these errors were encountered: