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(relations): issue with belongsToMany save method #108

Closed
wants to merge 2 commits into from
Closed

fix(relations): issue with belongsToMany save method #108

wants to merge 2 commits into from

Conversation

webdevian
Copy link
Contributor

Before saving a relationship in a pivot table it was attempting to save the first model. This was returning false if the model wasn't dirty and didn't need saving, then silently failing to save the pivot. I have changed this to a try catch, so if the save returns 0 it still goes on to insert the pivot record

Closes #107

Before saving a relationship in a pivot table it was attempting to save the first model. This was

returning false if the model wasn't dirty and didn't need saving, then silently failing to save the

pivot. I have changed this to a try catch, so if the save returns 0 it still goes on to insert the

pivot record

Closes #107
@coveralls
Copy link

coveralls commented Mar 7, 2017

Coverage Status

Coverage decreased (-1.4%) to 95.991% when pulling c9ba206 on webdevian:develop into cb40b80 on adonisjs:develop.

@coveralls
Copy link

coveralls commented Mar 7, 2017

Coverage Status

Coverage decreased (-1.3%) to 96.082% when pulling 90702cb on webdevian:develop into cb40b80 on adonisjs:develop.

@webdevian
Copy link
Contributor Author

I'm not sure how coverage has decreased 😕 All my new code is covered

@thetutlage
Copy link
Member

Closing and replied on the related issue

@thetutlage thetutlage closed this Mar 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