angularjs - Breeze client return undefined for navigation property id -


i not know why breeze.js not showing data database table, fields navaigation property applicationusers in asp identity returned undefined when query breeze controller resource endpoint on server fine http://prntscr.com/7be8af

i dont know have asp identity or thing wrong code. following need information.

/// user rehistration model patients , doctors public class applicationuser : identityuser {      [required]     [maxlength(100)]     public string firstname { get; set; }      [required]     [maxlength(100)]     public string lastname { get; set; }      public virtual icollection<allergy> patientallergy { get; set; } }   public class allergy {     public int id { get; set; }     public string patientid { get; set; }     public string doctorid { get; set; }     public int lookupallergyid { get; set; }     public string type { get; set; }     public string note { get; set; }      public virtual lookupallergy lookupallergy { get; set; }//navigation prop 1      /// <summary>     /// section asp.net identity     /// </summary>     [foreignkey("patientid")]     public virtual applicationuser patient { get; set; } //navigation prop 2     [foreignkey("doctorid")]     public virtual applicationuser doctor { get; set; }//navigation prop 3  }  /// configuration model public class allergyconfiguration : entitytypeconfiguration<allergy> {     public allergyconfiguration()     {         hasrequired(s => s.patient)            .withmany(p => p.patientallergy)            .hasforeignkey(s => s.patientid)            .willcascadeondelete(false);     } }  /// angular query using john papa code pattern johnpapa.net  function getpatientallallergy() {         var self = this;         var allergy;         var orderby = 'type';          return entityquery.from('allergies')             .select('id, lookupallergyid, patientid, doctorid, type, note')             .totype(entityname)             .using(self.manager).execute()             .then(querysucceeded, self._queryfailed);          function querysucceeded(data) {             allergy = data.results;             self.log('retrieved [rev allergy] remote data source', diagnosis.length, true);              ///if inspect information log found patientid , doctorid undefined while lookupallergyid return.             return allergy;         }     } 

the query return other entity data patientid , doctorid undefined while patient , doctor 'proto._setctor.instanceproto'

query server return patientid: "a0bb54a2-c347-424c-bbf3-7c05e0286b43",  doctorid: "a0bb54a2-c347-424c-bbf3-7c05e0286b43",   lookupallergyid: 1 // return ok  query client return id: (...) doctor: proto._setctor.instanceproto doctorid: undefined // return undefined lookupallergy: (...) lookupallergyid: 1 modifiedby: (...) modifiedbyid: (...) modifiedon: (...) note: (...) patient: proto._setctor.instanceproto patientid: undefined // return undefined type: (...) 

please, need on how resolve because navigation query returning null example {{vm.allergy.patient.email}} not possible.

thanks.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -