Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@fratzinger
Copy link
Contributor

See #363. I consider this quite hacky but it would solve my problem with multi-patch for a length of items > 10 for now. I would prefer to get this added to @feathersjs/adapter-tests and @feathersjs/adapter-commons (see issue #363) but wait the opinion of others on this.

@daffl
Copy link
Member

daffl commented Oct 14, 2021

I'd like to get this released as well but I'm wondering if this might be a breaking change. Either that or nobody is using this functionality? 🤷

@fratzinger
Copy link
Contributor Author

I have mixed feelings about this, too. I know scenarios where this definitely is a breaking change.

My scenario is:
On multi patch, use a before-hook with find (not explicitely not _find) with the exact same params to determine which records will be affected for some reasons. So find and patch/remove have to return the exact same records.

This is a reason against automatic paginate: false in patch (as suggested in this PR), because find by default would return max. 10 records and patch would return all records.

My current way to go is an early app.hooks.ts-before-hook for patch/remove that sets paginate: false if it's not set. This way my scenario works because it returns the same for find and patch.

That being said. I think this behavior should be the same for all 'major' adapters. I will see if I can come up with a test in @feathersjs/adapter-tests that can used in all adapters. When we have that and are clear that all adapters act the same, I think, we should add a note to the feathers.js main docs as a Important or Note quote.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.