This pull request refactors the toAppwrite method in the appwrite.models.dart file to include an isChild parameter. This parameter is used to determine whether or not to include the document ID on relationships. Additionally, the generateRelationshipToAppwriteField function in the attributes.dart file is updated to pass the isChild parameter when calling the toAppwrite method. The toAppwrite method in the model.dart file is also updated to include the isChild parameter and add the document ID ($id) to the returned map if isChild is false.
This pull request refactors the
toAppwrite
method in theappwrite.models.dart
file to include anisChild
parameter. This parameter is used to determine whether or not to include the document ID on relationships. Additionally, thegenerateRelationshipToAppwriteField
function in theattributes.dart
file is updated to pass theisChild
parameter when calling thetoAppwrite
method. ThetoAppwrite
method in themodel.dart
file is also updated to include theisChild
parameter and add the document ID ($id
) to the returned map ifisChild
is false.