I make the code to save the manytomany relation data, but this not working.
so I tested my parse-dashboard to add exist data, but not working as well.
anyone knows what cause the problem?
let postObject = new Post();
postObject.set("name", name);
postObject.set("description", description);
postObject.set("body", body);
postObject.set("user", currentUser);
postObject.set("username", currentUser.attributes.username);
postObject.set("status", "ready");
postObject.set("image", uploadImage);
postObject.set("thumbnail", thumbnailImage);
if(tags.length == 0){
postObject.set("tags", tagArray);
} else {
tagArray = tags.replace(" ", "").split(",");
postObject.set("tags", tagArray);
}
postObject.set("category", category);
let placeRelation = postObject.relation("place");
placeRelation.add(selectedPlaceList);
const result = saveData(postObject);
console.log(result);