BreezeJS选择ComplexType属性 [英] BreezeJS Selecting ComplexType properties
问题描述
我遇到了Breeze和Durandal的问题,这使我相信这可能是Breeze的错误,或者我不知道正确的语法。
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.
这是我的模型(假定Address只是一个简单的ComplexType类)
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;}
}
在Breeze JS的前端,我有以下内容:
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');
我收到以下错误消息:错误检索数据。没有定义deferred
I get the error message that Error retreiving data. deferred is not defined
看起来,似乎Select语句中没有ComplexType属性。还有其他人遇到这个问题吗?感谢您的帮助。
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.
推荐答案
编辑:2013年5月8日-现在在1.3.3版中已解决
Edit: May 8, 2013 - This is now fixed in v 1.3.3
我刚刚确认这是一个错误-您的查询语法正确(您不需要对复杂类型进行扩展)。我将尝试在下一个版本中对此进行更正,并在其发布时将其发布回此。感谢repro:)
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 :)
这篇关于BreezeJS选择ComplexType属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!