Closed L10Messi10 closed 2 years ago
You didn't add a before screenshot so I assume Teachers is a child of School. In that case, yes, put replaces the whole node. You can either include teachers in your put operation or use patch instead of put.
Yes, (Teachers) is the child of the School. Thank you for your feedback, PatchAsync solved the issue.
Does PutAsync really remove its child upon update? here is my code below.
`var evaluatesch = (await client .Child("Schools") .OnceAsync()).FirstOrDefault
(a => a.Object.SchoolID == sch_id);
Assuming that the database has been added with another child (Teachers) then upon executing the above code which updates the parent node, the child (Teacher) will be deleted. Here is the screenshot after executing the above code.