Skip to content
New issue

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

fix(lucid): add soft delete support to pair method #115

Closed
wants to merge 1 commit into from
Closed

fix(lucid): add soft delete support to pair method #115

wants to merge 1 commit into from

Conversation

webdevian
Copy link
Contributor

Fixes the first part of #109

@coveralls
Copy link

coveralls commented Apr 6, 2017

Coverage Status

Coverage increased (+0.003%) to 97.365% when pulling b043d23 on webdevian:fix-109 into cb40b80 on adonisjs:develop.

@webdevian
Copy link
Contributor Author

@thetutlage I had a go at fixing this one, not sure if this is the optimum place to check for soft deletes?

If so I'll do the same for more methods

@@ -464,8 +464,13 @@ methods.ids = function (target) {
* @return {Function}
*/
methods.pair = function (target) {
// console.log(target)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This the not the right way to do it. Instead we should apply all the global scopes when they exists. Same is done with fetch method.

https://github.com/webdevian/adonis-lucid/blob/b043d233bb0d08896abe28e9b894a1443fdadd36/src/Lucid/QueryBuilder/Serializers/Base.js#L37

@thetutlage
Copy link
Member

Fixed in c394950

@thetutlage thetutlage closed this Apr 8, 2017
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.

3 participants