breeze - Error when mapping entity where data from related table is required -


i doing simple projection query in breeze:

        var p1 = new predicate('id', 'eq', articleid);         var p2 = new predicate('isdeleted', '!=', true);         var p3 = new predicate('isautosave', '!=', true);         var query = entityquery.from(entitynames.article)             .where(p1.and(p2.and(p3)))             .select('code, description, imagefilename, notes, supplierdistance') 

i used entity mapper create partial entity put observable return function. good.

then realised needed country name related table, first tried ".expand" , told breeze couldn't "expand" , "select" simultaneously. no problem, select related record directly:

            .select('code, description, country.countryname, imagefilename, notes, supplierdistance') 

but there no "country_countryname" property on entity creating partial of, mapping fails (unsurprisingly) "undefined not function" error. how able include countryname field related table in way cannot map entity?

i tried stuffing javascript object returned query observable fails "object not function" error that's no either.

i decided entity mapping unnecessary in end , reverted simple projection query manually handled "expand".


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -