Xamarin C#:Parse.com关系表似乎只能以一种方式工作?

时间:2019-06-20 17:35:23

标签: parse-platform orm

我正在Visual Studio中使用Xamarin。

我正在使用Parse(通过SashiDo.com),并且试图在名为Users的表中创建Dispatch与ParseObjects之间的关系,如下所示:

        //Make the new Dispatch object
        var parseDispatch = new Parse.ParseObject("Dispatch");
        //Save it
        await parseDispatch.SaveAsync();

        //...Setting various properties on the Dispatch object...

        //Get a list of users (via another method)
        IEnumerable<ParseUser> usersToLink = UsersToLinkToDispatch(); //And have verified elsewhere that this indeed returns a collection of ParseUsers

        //Go through the users collection
        usersToLink.ToList().ForEach( async (user) => {

            //Get or create the dispatches-tracking relation for this user
            var dispatchObjectRelation = parseDispatch.GetRelation<ParseObject>("DispatchesTracked");

            //Add the current user to that tracker relation
            dispatchObjectRelation.Add(user);

            //save the dispatch to update the relation
            await parseDispatch.SaveAsync();
        });

因此,当我检查SashiDo中的表时,如果查看Dispatches表,则会看到一个外观合理的关系链接,如果单击该链接,则会看到链接的用户列表。到目前为止一切都很好,对吧?

但是,如果我查看“用户”表,虽然似乎也有一个看起来正确的关系链接,但是当我单击它时,我不会看到 链接的分派列表。

这是预期行为还是关系链接的这种明显单向错误?

0 个答案:

没有答案