WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@hugobarauna
Copy link
Contributor

I discovering this when our app called Repo.reload[] and a error was raised, causing an unknown bug.

Also, the typespecs for those functions are:

ecto/lib/ecto/repo.ex

Lines 1059 to 1062 in 8f1ef29

@callback reload(
struct_or_structs :: Ecto.Schema.t() | [Ecto.Schema.t()],
opts :: Keyword.t()
) :: Ecto.Schema.t() | [Ecto.Schema.t() | nil] | nil

which means and empty list [ ] is an expeted input and output.

@josevalim josevalim merged commit 1de9ba2 into elixir-ecto:master Dec 3, 2025
7 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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