Relation add not working

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");

const result = saveData(postObject);

What specific error(s) are you getting?

Make sure to check the class CLP to make sure you’re allowed.

As you can see the screenshot, I tried [attach rows to relation], and I insert the objectId to attach in relation. but it does work and it shows this error message “Cannot read properties of null (reading ‘forEach’)”

I think there is no problem with CLP. I did not touch anything and it checked public read and write.

my apps version is blow

Parse-Dashboard 4.1.4
Parse-Server 5.2.4
Node 16

I got the same issue. when I reload the data is shows the datas

I think your problem is a bit different as my issue was just on the dashboard. adding relations via code worked fine for me on that post.

If the problem you have is just on the Dashboard, refreshing the relation page will fix it.

what error do you get on your console.log()?

Today I confirm that my code works fine. I just can’t see the datas what I saved on code in dashboard. so I did my job done today.

thanks very much. @jayson
Anyway do you know Parse Community have any plan to fix the error in Parse-Dashboard what currently happened?
Refreshing the page whenever check the data is really annoying.

ah so same problem as mine.

I have filed a bug report in the Parse-Dashboard repo but not sure when it’ll be looked into.

1 Like