使用JayData过滤标题详细信息表-内部联接SQL,oData [英] Using JayData to filter Header Detail Table - Inner Join SQL, oData
问题描述
您好,我使用JayData和oData,所以请原谅我的无知.
Hello Am kinda new and using JayData and oData so please forgive my ignorance.
这是我的对象结构:
$data.Entity.extend('PlannerModel.vMasterPlanner', {
'Sequence_Number': { key:true,type:'Edm.Int32',nullable:false,required:true },
'Scenario_Name': { type:'Edm.String',nullable:true,maxLength:250 },
'Activity_ID': { type:'Edm.String',nullable:false,required:true,maxLength:250 },
'Activity_Description': { type:'Edm.String',nullable:true,maxLength:500 },
'Object_ID': { type:'Edm.String',nullable:true,maxLength:250 },
'Object_Description': { type:'Edm.String',nullable:true,maxLength:400 },
'Operation_Code': { type:'Edm.String',nullable:false,required:true,maxLength:250 },
'Operation_Description': { type:'Edm.String',nullable:true,maxLength:50 },
'Crew_ID': { type:'Edm.String',nullable:true,maxLength:250 },
'Crew_Name': { type:'Edm.String',nullable:true,maxLength:50 },
'Period': { type:'Edm.Int32',nullable:true },
'vActivity': { type:'PlannerModel.vActivity',required:true,inverseProperty:'vMasterPlanners' } });
$data.Entity.extend('PlannerModel.vActivity', {
'Activity_ID': { key:true,type:'Edm.String',nullable:false,computed:true },
'Activity_Name': { type:'Edm.String',nullable:false,required:true },
'vMasterPlanners': { type:'Array',elementType:'PlannerModel.vMasterPlanner',inverseProperty:'vActivity' } });
$data.EntityContext.extend('PlannerServiceLibrary.PlannerEntities', {
ProgressDetails: { type: $data.EntitySet, elementType: PlannerModel.ProgressDetails },
ProgressHeaders: { type: $data.EntitySet, elementType: PlannerModel.ProgressHeader },
vCrews: { type: $data.EntitySet, elementType: PlannerModel.vCrew },
vPeriods: { type: $data.EntitySet, elementType: PlannerModel.vPeriod },
vOperations: { type: $data.EntitySet, elementType: PlannerModel.vOperation },
vActivities: { type: $data.EntitySet, elementType: PlannerModel.vActivity },
vMasterPlanners: { type: $data.EntitySet, elementType: PlannerModel.vMasterPlanner } });
请稍作解释: 表主计划程序是明细表,表活动是表头表 我需要从活动表(标题)中选择所有活动,其中在详细信息表中找到的乘员组ID例如= 2 我该如何使用oData和JayData
Just a little explanation : Table Master planner is a detail table and Table activity is the header table I need to select all the activities from the activity table (header) where the crew ID which is found in the detail table for example = 2 how can i do that using oData and JayData
当前正在使用
provider.vActivities.filter(function (ac) {
return ac.vMasterPlanners.Crew_ID == "FM2_F/W" })
.toArray(function (e) {
console.log(e);
});
,这是要处理的错误未知表达式类型:EntitySetExpression 本地主机/移动网络/htdocs/assets/jayData/jaydata.js 第89行
and this is the error Unknown expression type to handle: EntitySetExpression localhost/mobile-web/htdocs/assets/jayData/jaydata.js Line 89
请帮助任何人!
谢谢!
推荐答案
It looks like a known issue I have added it in to github http://github.com/jaydata/jaydata/issues/70
这篇关于使用JayData过滤标题详细信息表-内部联接SQL,oData的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!