BreezeJS Selecting ComplexType properties

北城余情 提交于 2019-12-12 00:35:13

问题


I am running into an issue with Breeze and Durandal which is leading me to believe it may be a bug with Breeze or that I don't know the right syntax.

Here is my model (given that Address is just a simple ComplexType class)

public class Person {
   public int Id {get;set;}
   public string Name {get;set;}
   public Address MyAddress {get;set;}
}

And on the front-end with Breeze JS, I have the following:

EntityQuery.from('Person').select('id,name').orderBy('id');

The above line works perfect, but if I have:

EntityQuery.from('Person').select('id,name,myAddress').orderBy('id');

I get the error message that Error retreiving data. deferred is not defined

It looks like as though, you can't have the ComplexType property in the Select statement. Anyone else is running into this issue? Thanks for your help in advance.


回答1:


Edit: May 8, 2013 - This is now fixed in v 1.3.3


I've just confirmed that this is a bug - Your query syntax is correct ( you do not need an expand for complex types). I will try to get this corrected in the next release and will post back here when it gets in. And thanks for the repro :)



来源:https://stackoverflow.com/questions/16444122/breezejs-selecting-complextype-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!