在breeze中使用fetchEntityByKey方法时,Navigation属性为null

时间:2013-11-13 20:02:27

标签: breeze

如何在微风中使用fetchEntityByKey方法获取实体的导航属性?它甚至可能吗?

1 个答案:

答案 0 :(得分:1)

如果要“获取”导航属性的值,请使用EntityAspect.loadNavigationPrperty method

 myEntity.entityAspect.loadNavigationProperty("Orders").then(function (data) {
    var orders = data.results;
 }).fail(function (exception) {
    // handle exception here;
 });