gpt4 book ai didi

tridion - UGC 用户返回为 Null

转载 作者:行者123 更新时间:2023-12-02 10:32:12 24 4
gpt4 key购买 nike

我正在使用 UGC Web 服务返回 UGC 内容,但我遇到一个问题,即用户返回为空。用户正在输入 UGC 数据库 - 我可以在 UGC_USERS 表和 UGC_ITEMS 表中看到用户,但是当使用 odata.svc 检索评论时,用户将返回为空。

WebServiceClient ugcCall2 = new WebServiceClient();
Uri uri = new Uri("http://new.ugc.service/odata.svc");
CDS.ContentDeliveryService cds = new CDS.ContentDeliveryService(uri);
var comments = client.Comments;

有谁知道为什么会这样吗? Audience Manager 目前尚未投入使用。我们只是添加来自域用户的评论 - 用户名出现在 UGC 数据库中,但当我们从 odata 检索评论时,该用户返回为空。

谢谢

约翰

最佳答案

约翰,

确保您在调用中使用 Expand 方法:

client.Comments.Expand("User")

这将确保完整的用户数据也是结果的一部分。

直接查询Odata就可以清楚的看到:

odata.svc/Comments?$expand=User

干杯

关于tridion - UGC 用户返回为 Null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15028847/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com