Reading Tenant ETS resources returns empty array
I am trying to read a tenanted ets resource but always getting empty list when trying to read, though creates are "successful".
Below is my IEX session
Below is my IEX session
Timshel.Ash.EtsComponent |> Ash.Changeset.for_create(:create, %{root: true}, tenant: "7473fdbc-4f04-4bbf-bf1f-c9721ebd18b6") |> Timshel.Ash.Api.create!()
#Timshel.Ash.EtsComponent<
organization: #Ash.NotLoaded<:relationship>,
page: #Ash.NotLoaded<:relationship>,
__meta__: #Ecto.Schema.Metadata<:loaded>,
id: "4922c76a-a6c3-4244-86fc-ca7eb7fbcd6c",
root: true,
template: nil,
name: nil,
page_id: nil,
organization_id: "7473fdbc-4f04-4bbf-bf1f-c9721ebd18b6",
aggregates: %{},
calculations: %{},
__order__: nil,
...
>
iex(test@Georges-MacBook-Pro)7> Timshel.Ash.EtsComponent |> Ash.Query.set_tenant("7473fdbc-4f04-4bbf-bf1f-c9721ebd18b6") |> Timshel.Ash.Api.read() {:ok, []} Timshel.Ash.EtsComponent |> Ash.Changeset.for_create(:create, %{root: true}, tenant: "7473fdbc-4f04-4bbf-bf1f-c9721ebd18b6") |> Timshel.Ash.Api.create!()
#Timshel.Ash.EtsComponent<
organization: #Ash.NotLoaded<:relationship>,
page: #Ash.NotLoaded<:relationship>,
__meta__: #Ecto.Schema.Metadata<:loaded>,
id: "4922c76a-a6c3-4244-86fc-ca7eb7fbcd6c",
root: true,
template: nil,
name: nil,
page_id: nil,
organization_id: "7473fdbc-4f04-4bbf-bf1f-c9721ebd18b6",
aggregates: %{},
calculations: %{},
__order__: nil,
...
>
iex(test@Georges-MacBook-Pro)7> Timshel.Ash.EtsComponent |> Ash.Query.set_tenant("7473fdbc-4f04-4bbf-bf1f-c9721ebd18b6") |> Timshel.Ash.Api.read() {:ok, []}