问题
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