Breeze Extended Entity Property Only Loads on Second Query

前端 未结 2 2022
清歌不尽
清歌不尽 2021-01-07 10:12

Hopefully someone has a better insight into Breeze\'s Extended entities, because I\'m stumped! So, I have created a partial class (WO_Rout) on the server side (Web API using

2条回答
  •  孤街浪徒
    2021-01-07 11:02

    Check out Ward's answer in the below question - it should give you guidance on unmapped properties.

    UnMapped property on the Angular/Breeze SPA template

    I don't see how it is working at all to be honest, unless I am missing something you have butchered the expand()

    query = query.where("req_no", "==", reqNo)
            .expand(["WO_RtHelp.WO_Rout", "WO_RtHelp.WO_Rout.eqptmast", "WO_RtHelp.WO_Act.WO_Resources.persmast", "WO_RtHelp.WO_Act.WO_Resources.Kits", "WO_RtHelp.WO_Act.Activity", "WO_RtHelp.WO_Act.WO_Resources.customer", "WO_RtHelp.WO_Act.WO_Resources.eqptmast", "WO_RtHelp.WO_Act.WO_Resources.invsite.invmast", "WO_RtHelp.WO_Act.WO_Resources.crew"])
    

    should be a string, with values separated inside of it -

     query = query.where("req_no", "==", reqNo)
            .expand("WO_RtHelp.WO_Rout", "WO_RtHelp.WO_Rout.eqptmast, WO_RtHelp.WO_Act.WO_Resources.persmast, WO_RtHelp.WO_Act.WO_Resources.Kits, WO_RtHelp.WO_Act.Activity, WO_RtHelp.WO_Act.WO_Resources.customer, WO_RtHelp.WO_Act.WO_Resources.eqptmast, WO_RtHelp.WO_Act.WO_Resources.invsite.invmast, WO_RtHelp.WO_Act.WO_Resources.crew")
    

    Note that I did not pass an array of strings, I passed a string that separated the values with commas.

提交回复
热议问题