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

Added trx support to findOrCreate #372

Merged
merged 4 commits into from Sep 6, 2018
Merged

Added trx support to findOrCreate #372

merged 4 commits into from Sep 6, 2018

Conversation

marceloadsj
Copy link
Contributor

@marceloadsj marceloadsj commented Aug 28, 2018

Conditionally use trx when exists in findOrCreate method

Proposed changes

Fix the stuck timeout problem when using trx with findOrCreate

Types of changes

What types of changes does your code introduce?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

Conditionally use trx when exists in findOrCreate method
@thetutlage
Copy link
Member

Please add supporting tests for the change :)

@marceloadsj
Copy link
Contributor Author

Oh yah! Today I will add a unit test to it :)

@iam4x
Copy link

iam4x commented Aug 31, 2018

Hey @marceloadsj wanna do it? Or I have myself a PR with the tests written on the pipe as well.

@marceloadsj
Copy link
Contributor Author

Hello, sorry the delay. I've created 2 tests with trx:

  • one for findOrCreate when found
  • one when findOrCreate creates a new row

@thetutlage thetutlage merged commit 1e7b2a8 into adonisjs:develop Sep 6, 2018
@thetutlage
Copy link
Member

Thanks 😄

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.

None yet

4 participants