Deleting intermediary table record in a many_to_many relationship
In this example (https://hexdocs.pm/ash/2.6.18/managing-relationships.html) that Post and Tag have a many_to_many relationshp through PostTag, how do I make it so that the deletion of Post also deletes the record in PostTag , but not Tag?
In post.ex, I have this action
destroy :delete_post doend
destroy :delete_post doend
which issues this error.
** (Ash.Error.Invalid) Input Invalid* Invalid value provided for id: would leave records behind.nil
** (Ash.Error.Invalid) Input Invalid* Invalid value provided for id: would leave records behind.nil
I tried adding manage_relationship with various type options to this but couldn't get it to do what I want.
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.