Closed extremal closed 5 years ago
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."
@slnode test please
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS
file at the top-level of this repository.
Description
Fields which were excluded by setting them null in the model json file were still included into the select expression in the query. That was generating broken sql queries because fields were physically absent in the database (expected):
STATEMENT: SELECT "id","clienttype","redirecturis","tokenendpointauthmethod","granttypes","responsetypes","tokentype","clientsecret","clientname","clienturi","logouri","scopes","contacts","tosuri","policyuri","jwksuri","jwks","softwareid","softwareversion","realm","name","description","owner","collaborators","email","emailverified","clientkey","javascriptkey","restapikey","windowskey","masterkey","pushsettings","status","created","modified","icon","url","callbackurls","permissions","authenticationenabled","anonymousallowed","authenticationschemes" FROM "public"."oauthclientapplication" WHERE "id"=$1 ORDER BY "id" LIMIT 1
Using the recommended Loopback approach to exclude properties from the base model fixed the issue for me. https://loopback.io/doc/en/lb3/Model-definition-JSON-file.html#exclude-properties-from-base-model
Related issues
Checklist