I have a struct id, “ab123”, I know this struct is either in schema X or schema Y, and I am not sure which one has the struct. So, I want to find it from X first, and, if I can’t find it, then from Y, like,
if x = Repo.get!(X, id) do
x
else if y = Repo.get!(Y, id)
y
end
Of course, it doesn’t work. When Repo.get!(X, id) returns nothing, the process stops. So, Repo.get!(Y, id) can’t be reached.
Any idea will be appreciated.