Breeze:无法读取属性';xxx和x27;空值?

Breeze:无法读取属性';xxx和x27;空值?,breeze,Breeze,我知道有一些类似的问题(例如),但它们似乎都在不同的背景下。这是我在chrome控制台中看到的: Unhandled rejection reasons (should be empty): ["TypeError: Cannot read property 'compound' of null…://localhost:1476/Scripts/breeze.debug.js:234:15)", joinBy: function, equals: function, indexByKey:

我知道有一些类似的问题(例如),但它们似乎都在不同的背景下。这是我在chrome控制台中看到的:

Unhandled rejection reasons (should be empty): 
["TypeError: Cannot read property 'compound' of null…://localhost:1476/Scripts/breeze.debug.js:234:15)", joinBy: function, equals: function, indexByKey: function, getByKey: function, sortOn: function]
我可以在以下位置的调试器中看到此错误:失败(错误):


对于一个特定的对象,这种情况大多数时候都会发生,但不总是发生(也许每10个中就有一个是可以的)。来自服务器的查询毫无例外地返回。如我所想,它似乎与具有特定include of表的查询相关。然而,实际上,在本例中,包含的表还没有任何相关的条目(如果有条目,它似乎没有任何问题)。知道吗?

好的,我不小心发现了这个错误的原因。它是元数据存储后构造初始值设定项,类似于

    manager.metadataStore.registerEntityTypeCtor("Result", Result, initialize);
    // constructor
    function Result() {
    }
    // post-construction initializer
    function initialize(result) {
        result.cmpName = result.cs.compound.name;
    }
其中result.cs有时可能为null。
很遗憾,错误消息没有提供任何线索。

您能发布查询以及您所引用的特定对象的外观吗?
    manager.metadataStore.registerEntityTypeCtor("Result", Result, initialize);
    // constructor
    function Result() {
    }
    // post-construction initializer
    function initialize(result) {
        result.cmpName = result.cs.compound.name;
    }