我是Breeze JS的新手。我的水疗应用程序正在使用微风,淘汰,EF和MVC框架。
我的poco实体定义是
public partial class Tbl_GLB_Library
{
System.Guid ID { get; set; }
public string FileName { get; set; }
public string Extension { get; set; }
public Nullable<long> Size { get; set; }
public string Description { get; set; }
public Nullable<System.DateTime> CreationTime { get; set; }
public Nullable<System.DateTime> LastWriteTime { get; set; }
public Nullable<System.DateTime> LastAccessTime { get; set; }
public byte[] FileData { get; set; }
public string FilePath { get; set; }
public byte[] RowVersion { get; set; }
}
在客户端,我使用自定义构造函数添加了一个未绘制的属性:
function addTbl_GLB_LibrariesProperties() {
var metadataStore = Manager.metadataStore;
metadataStore.registerEntityTypeCtor('Tbl_GLB_Library', null, Tbl_GLB_LibraryInit);
function Tbl_GLB_LibraryInit(Library) {
Library.FileContent = ko.observable();
}
}
获取元数据和一些数据后,我需要查询缓存的数据。
query = breeze.EntityQuery.from("Tbl_GLB_Library").where(breeze.Predicate.create('FileContent', breeze.FilterQueryOp.Equals, null));
return Manager.executeQueryLocally(query);
此场景适用于所有映射的属性,但对于FileContent
,这是一个未绘制的属性,抛出了一个例外!我如何解决这个问题?
您是否将namingconvention设置为骆驼?如果谓词的左手表达是错误的情况,则此错误消息将出现。只需尝试将其更改为filecontent,您就会很快知道这是否是问题。