Diego Ledesma
Diego Ledesma
@codejie as @fabien pointed out the `strictObjectIDCoercion` is now available for RoleMapping model in new applications created using `lb`, `apic` etc. In my case I had to add it manually...
@raymondfeng @wtfribley sorry to bring this issue back but is this feature currently available? Seems that `hasAndBelongsToMany` relations are omitting the `through` model that's specified and I can't find it...
@ebarault @akshayKrSingh I'm also facing the same issue. Couldn't repro using your Sandbox. I verified that my dependencies are up to date. The only difference I can find is that...
@ebarault Looks like my application was created with an older version of `lb` which doesn't automatically set `strictObjectIDCoercion` for RoleMapping model. After adding it to `model-config.json` roles started working fine....
Doing a bit more research seems that this is the case for GET requests but not for POST/PUT. Customizing what `options` returns solves the issue: https://loopback.io/doc/en/lb3/Using-current-context.html#access-the-context-from-operation-hooks
Dispite all this I believe it would be nice if access token were available by default in the `options` object.
@bajtos Sorry for the delay in replying. I think I didn't explain well. The `options` parameter is set correctly for `GET` requests. The problem is with `PUT` or `POST` requests....
@SamKirkland is there a reason not to submit a PR for the work you have already done?