I have a user resource and I need to assign a user to one_on_one resource. The one_on_one resource has two arguments user_1 and user_2. I am at a loss on how I should define the relationship. I know how I want the table design to be:
Where user_id_1 can't be the same as user_id_2. Anyone else struggle with this part of Ecto?
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.