Skip to content

Support preloading associations in embedded schemas from the parent schema#3965

Closed
Sleepful wants to merge 4 commits intoelixir-ecto:masterfrom
Sleepful:master
Closed

Support preloading associations in embedded schemas from the parent schema#3965
Sleepful wants to merge 4 commits intoelixir-ecto:masterfrom
Sleepful:master

Conversation

@Sleepful
Copy link
Copy Markdown
Contributor

@Sleepful Sleepful commented Jul 29, 2022

Implements enhancement #3890

Sorry for the huge diff, I do not know if my formatter is working properly or not, I tried:

mix format --dot-formatter ./.formatter.exs ./lib/ecto/repo/preloader.ex

...to no avail.

There is this one bit of code hiding a stacktrace, I left a comment there, confused me a bit.

I am an Elixir newbie so I am mostly unaware of what makes "good" code.

Comment on lines +65 to +71
# NOTE: this "ignore preload inner stacktrace" was quite
# misleading to me, is there something to gain from hiding
# the stacktrace like this?
rescue
e ->
# Reraise errors so we ignore the preload inner stacktrace
filter_and_reraise e, __STACKTRACE__
filter_and_reraise(e, __STACKTRACE__)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

😕

@josevalim
Copy link
Copy Markdown
Member

We haven't run the formatter in this repo yet, so can you please submit/update the PR without the formatter changes? Thank you!

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