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 Ecto sandbox when using Ecto.Multi #130

Conversation

arnodirlam
Copy link

Resolves #129.

|> Ecto.Multi.run(:loader, fn _, _ ->
loader
|> Dataloader.load(Test, User, user.id)
|> Dataloader.run()
Copy link
Contributor

Choose a reason for hiding this comment

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

All of the errors actually show that the error is that this isn't returning an :ok tuple. If you fix that issue do the other issues persist?

Copy link
Author

Choose a reason for hiding this comment

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

Oh, you're absolutely right, I misinterpreted the error message. It does work when returning an :ok tuple 😅 I'm gonna close the PR and issue then. Thanks a lot for your time and help! 🙏

@arnodirlam arnodirlam closed this Aug 18, 2021
@arnodirlam arnodirlam deleted the fix/ecto-sandbox-with-multi branch August 18, 2021 11:14
@arnodirlam arnodirlam restored the fix/ecto-sandbox-with-multi branch September 24, 2021 15:48
@benwilson512
Copy link
Contributor

Handled now in 1.0.11 and 2.0

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.

Error when used in transactions
2 participants