Support Topics Documentation Slack YouTube Blog

How to add Relation with Flutter

hi sir,
I’m trying to add Relation but still error
my code :
Map data = {“objectId”: ‘ACAB51D4-CF6B-C5F6-FFD3-98F92F8E3F00’};
db.addRelation(data, ‘CartProductId:Production:1’,
children: [
{“objectId”: ‘BFB3AE3A-928F-7EDA-FF18-E47A2351C000’}
],
whereClause: “CartItem = 4”)
.then((value) {
print(value);
});

image

thank you for help ^^

Why do you pass both children and where clause?
It needs to be one or the other.

Regards,
Mark

thank sir.
i’m try again

Hi @Savan_ITDEV

Seems like parent object with id “ACAB51D4-CF6B-C5F6-FFD3-98F92F8E3F00” is not existed

Regards, Vlad