We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As the title says, it seams like it's impossible to transform related content if using .paginate() instead, for example, .collection().
This will work (but it will not return adonis pagination info):
const posts = await Posts.query().with('tags').paginate() transform.include('tags').collection(posts, PostTransformer)
This will not work:
const posts = await Posts.query().with('tags').paginate() transform.include('tags').paginate(posts, PostTransformer)
Error thrown is: model.getRelated is not a function... PostTransformer has this include:
includeTags(model) { return this.collection(model.getRelated('tags'), TagTransformer) }
Without .include() and defaultIncludes inside transformer, .paginate() works as expected
The text was updated successfully, but these errors were encountered:
This issue was fixed by @spamoom in #14
Sorry, something went wrong.
No branches or pull requests
As the title says, it seams like it's impossible to transform related content if using .paginate() instead, for example, .collection().
This will work (but it will not return adonis pagination info):
This will not work:
Error thrown is: model.getRelated is not a function... PostTransformer has this include:
Without .include() and defaultIncludes inside transformer, .paginate() works as expected
The text was updated successfully, but these errors were encountered: