mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-19 21:13:19 +12:00
fix: don't use fragment("1")
because ecto requires a proper source
This commit is contained in:
parent
991510b87f
commit
69d8a732f0
2 changed files with 4 additions and 5 deletions
|
@ -1561,7 +1561,7 @@ defmodule AshPostgres.Expr do
|
|||
on_subquery: fn subquery ->
|
||||
subquery =
|
||||
Ecto.Query.from(row in Ecto.Query.exclude(subquery, :select),
|
||||
select: fragment("1")
|
||||
select: row
|
||||
)
|
||||
|> Map.put(:__ash_bindings__, subquery.__ash_bindings__)
|
||||
|
||||
|
|
|
@ -16,10 +16,9 @@ defmodule AshPostgres.Test.ManualRelationshipsTest do
|
|||
end
|
||||
|
||||
test "exists can be used" do
|
||||
post =
|
||||
Post
|
||||
|> Ash.Changeset.new(%{title: "title"})
|
||||
|> Api.create!()
|
||||
Post
|
||||
|> Ash.Changeset.new(%{title: "title"})
|
||||
|> Api.create!()
|
||||
|
||||
Comment
|
||||
|> Ash.Changeset.new(%{title: "title2"})
|
||||
|
|
Loading…
Reference in a new issue