2016-10-17 4 views
0

に私はそよ風にこのJSON述語を使用しようとしています:どのようにいずれかとしてJSONクエリを作成する()Breezejs

predicate.push({ 
     or: [ 
      { not: { relocationStates: { any: {} } } }, 
      { relocationStates: { any: { "state.id": { "eq": 11 } } } } 
     ] 
    }); 

ないの目的:{relocationStates:{いかなる:{}}}ですrelocationStatesの空のリストを含むすべての項目を含める。それはすることが可能である

TypeError: Cannot read property 'key' of null 

:ODATA URLが正常に動作します

$filter=(not RelocationStates/any()) or (RelocationStates/any(x1: (x1/State/Id eq 11))) 

ザ・上が、breezejsが持つURLやエラーを作成することができません:

これは以下のようにODATA URLを作成する必要がありますsubmitemsのリストが空のすべての項目を返すBreezejsでjsonクエリを作成しますか?

答えて

0

これはバグのようです。私はBreezeのcreated an issue for itです。あなたは次のリリースで修正を期待できます。

回避策は、relocationStatesの場合に常にtrueになる節を入れることです。

{ not: { relocationStates: { any: { "id": { "ne": null } } } } } 
関連する問題