schema "foo" do
field :somefield, :string
field :someotherfield, :integer
...
has_one :bar, MyApp.Bars.Bar
timestamps()
end
schema "bar" do
field :somefield, :string
field :someotherfield, :integer
...
belongs_to :foo, MyApp.Foos.Foo
timestamps()
end
foo_id is defined on the bar table with a unique index.
What would be the cleanest way to query for all Foos with no related Bar?