Hi,
I have to contexts: Registry and Analytic.
I would like to make a join in the Analytic context with some schema that belongs to the registry context.
defmodule Quant.Analytic do
import Ecto.Query, warn: false
alias Quant.Repo
alias Quant.Analytic.Rnod
defmodule RnodFrontEnd do
defstruct [:id, :entry, :exit, :risk, :atr, :vwap, :shares]
end
def list_rnods_fe do
Repo.all(from r in Rnod,
inner_join: f in Quant.Repository.Fact, where: f.id == r.fact_id,
select: %RnodFrontEnd{id: r.id, entry: r.entry, exit: r.exit, risk: r.risk, atr: f.atr, vwap: r.vwap, shares: r.shares},
order_by: r.id)
end
end
But I keep getting the following error: module Quant.Repository.Fact is not available
.
What should I do?