Skip to content

Conversation

abhilashmurthy
Copy link

Used to fail when my model has a default scope in its model.json

scope: { include: ['model1', 'model2'] } 

and I make a filter REST API call with
/api/model?include=model3

Turns out the requested include was never included in the serialised result because

  1. isLoopbackInclude checked for an incomplete condition, which overrode isJSONAPIInclude -> added ctx.args.filter.include to make it correct
  2. setRequestedInclude did not account for object of type { [modelName]: true } -> made it do so
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.554% when pulling d28e324 on abhilashmurthy:fix-requested-include-pojo into a7083aa on digitalsadhu:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants