{"version":"1.0","type":"rich","title":"many to many in eilxir","description":"This example shows how to define a many-to-many relationship between users and groups in Elixir using the Ecto ORM. The code demonstrates the `has_many/3` macro with the `:through` option, which traverses the join schema `group_users` to associate both sides of the relationship. Each schema—`User`, `Group`, and `GroupUser`—declares its associations, and the final query uses `Repo.get` followed by `Repo.preload` to fetch a user with their groups eagerly loaded. The rendering approach is purely code-based, with no visualization or charting library involved.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-8e322e9a8f52be00331a?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}