So I came accross a wierd issue today that I would like to find the explanation
I have a record named Record1 with fields something: String and another record Record2
which has a field :record1_id which appears as
belongs_to :record1, Record1
in record definition
And what happends is that when i run the whole server application like
iex -S mix phx.server I can list preload and everything. Problem is that when I tried to preload object2 with object1
Repo.all(Record2) |> Repo.preload(:record_1)
within test I get an error. Complaining about missing fields.
** (Postgrex.Error) ERROR 42703 (undefined_column) column c0.something does not exist
same thing works as expected in normal mode (iex -S mix phx.server)
anybody faced similar issues to give me an explanation ?