ash_phoenix/test/support/resources/post_link.ex
Zach Daniel 9350101bb5 improvement: add use_data? opt to add_related
test: add some tests for `add_related`
fix: don't assume an empty map is an indexed map
2021-07-12 17:19:06 -04:00

12 lines
334 B
Elixir

defmodule AshPhoenix.Test.PostLink do
use Ash.Resource, data_layer: Ash.DataLayer.Ets
ets do
private?(true)
end
relationships do
belongs_to(:source_post, AshPhoenix.Test.Post, primary_key?: true, required?: true)
belongs_to(:destination_post, AshPhoenix.Test.Post, primary_key?: true, required?: true)
end
end