<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="325394" data-post-id="325394">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Feel free to open any issues for things like that?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="325394" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-325394" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="325394"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #32"></div>
  </section>
</div>
    <div class="postbit" id="325397" data-post-id="325397">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="BartOtten" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/BartOtten/120/25440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  BartOtten
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Now I know it should be up to date I’ll raise an issues (or PR) when found. Thanks for the rapid response.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="325397" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-325397" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="325397"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #33"></div>
  </section>
</div>
    <div class="postbit" id="326262" data-post-id="326262">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="TwistingTwists" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/TwistingTwists/120/21564_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  TwistingTwists
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>do the live book tutorials work with Ash 3.0 ?<br>
I am getting<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/a/d/ad153409298a794ae71ef0ba09e7b6a973a835d4.jpeg" data-download-href="https://forum.elixirforum.com/uploads/default/ad153409298a794ae71ef0ba09e7b6a973a835d4" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/optimized/3X/a/d/ad153409298a794ae71ef0ba09e7b6a973a835d4_2_690x337.jpeg" alt="image" data-base62-sha1="oHa1RZ4GFx2WrNWct9v9cJFeTFa" width="690" height="337" srcset="https://forum.elixirforum.com/uploads/default/optimized/3X/a/d/ad153409298a794ae71ef0ba09e7b6a973a835d4_2_690x337.jpeg, https://forum.elixirforum.com/uploads/default/optimized/3X/a/d/ad153409298a794ae71ef0ba09e7b6a973a835d4_2_1035x505.jpeg 1.5x, https://forum.elixirforum.com/uploads/default/original/3X/a/d/ad153409298a794ae71ef0ba09e7b6a973a835d4.jpeg 2x" data-dominant-color="C7C9D4"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1200×587 60.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">** (Ash.Error.Framework) Framework Error

* Tutorial.Support.Ticket.assign must be performed atomically, but it could not be

Reason: cannot atomically manage relationships

See https://hexdocs.pm/ash/3.0.0-rc.15/update-actions.html#atomic-updates for more on atomics.

  (elixir 1.15.7) lib/process.ex:860: Process.info/2
  (ash 3.0.0-rc.33) lib/ash/error/framework/must_be_atomic.ex:5: Ash.Error.Framework.MustBeAtomic.exception/1
  (ash 3.0.0-rc.33) lib/ash/actions/update/update.ex:170: Ash.Actions.Update.run/4
  (ash 3.0.0-rc.33) lib/ash.ex:2447: Ash.update/2
  (ash 3.0.0-rc.33) lib/ash.ex:2408: Ash.update!/2
  (elixir 1.15.7) src/elixir.erl:396: :elixir.eval_external_handler/3
  (stdlib 5.1.1) erl_eval.erl:750: :erl_eval.do_apply/7
  (elixir 1.15.7) src/elixir.erl:375: :elixir.eval_forms/4
    (elixir 1.15.7) lib/process.ex:860: Process.info/2
</code></pre>
<p>this is from 9 - Managing relationships.<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/a/3/a3c5a2606e3d78a6da874177dffc511717e3f857.jpeg" data-download-href="https://forum.elixirforum.com/uploads/default/a3c5a2606e3d78a6da874177dffc511717e3f857" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/a/3/a3c5a2606e3d78a6da874177dffc511717e3f857.jpeg" alt="image" data-base62-sha1="nmNfWC3YAomH43stFZ80URhmfun" width="690" height="298" data-dominant-color="CCCED1"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1200×519 34.6 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="326262" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-326262" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="326262"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #34"></div>
  </section>
</div>
    <div class="postbit" id="326265" data-post-id="326265">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>An, right this is a consequence of a recent change to support atomics in ETS. I will update the tutorial. Are there any other broken places that you saw?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="326265" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-326265" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="326265"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #35"></div>
  </section>
</div>
    <div class="postbit" id="326289" data-post-id="326289">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Okay, I’ve addressed this in the tutorial. Specifically, I’ve removed the need to use <code>manage_relationship</code> at all in the Livebook tutorial, and therefore all of the actions are atomic safe <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> Would you mind taking a look to see what you think?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="326289" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-326289" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="326289"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #36"></div>
  </section>
</div>
    <div class="postbit" id="326292" data-post-id="326292">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="TwistingTwists" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/TwistingTwists/120/21564_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  TwistingTwists
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>So the tutorial works now.<br>
Thanks for this <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="326292" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-326292" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="326292"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #37"></div>
  </section>
</div>
    <div class="postbit" id="326293" data-post-id="326293">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="TwistingTwists" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/TwistingTwists/120/21564_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  TwistingTwists
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Ash-Core-Team" data-username="zachdaniel" data-post="37" data-topic="62684" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/48/31980_2.png" class="avatar"> zachdaniel:</div>
<blockquote>
<p>Okay, I’ve addressed this in the tutorial. Specifically, I’ve removed the need to use <code>manage_relationship</code> at all in the Livebook tutorial, and therefore all of the actions are atomic safe <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> Would you mind taking a look to see what you think?</p>
</blockquote>
</aside>
<p>I think there is a need for a ‘showcase’ repo / livebook depicting various use cases for <code>many-many</code> relationships. especially, showcasing <code>manage_relationship</code> – that is most common use case where I get stuck frequently.</p>
<p>Here are a few scenarios I have come across. Feel free to add more to the list.</p>
<hr>
<ol>
<li><strong>user</strong>  many-many <strong>orgs</strong> <code>through</code> <strong>user_orgs</strong></li>
</ol>
<p><strong>user_orgs</strong> has keys <code>:user_role</code> + <code>user_id</code> + <code>org_id</code></p>
<p>A. when deleting <strong>user</strong> → delete from <strong>user_orgs</strong> but don’t delete <strong>orgs</strong><br>
B. when deleting <strong>user</strong> → also delete <strong>user_orgs</strong> and <strong>orgs</strong><br>
C. when creating <strong>user</strong> → also create <strong>org</strong> and pass the <code>user_role </code> in <code>manage_relationship</code></p>
<hr>
<ol start="2">
<li><strong>artist</strong> many-many <strong>album</strong> <code>through</code> <strong>artist_album</strong><br>
<strong>album</strong> many-many <strong>songs</strong> <code>through</code> <strong>album_songs</strong></li>
</ol>
<p>A. <code>create_song_with_artist_and_album</code> → takes <strong>song</strong> attributes and artist_id, album_id to manage those</p>
<hr>
<p>as of now, hooking into <code>after_action</code> has been a goto strategy to make these work. But ideally, I would love to understand how can I achieve the same using <code>manage_relationship</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="326293" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-326293" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="326293"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #38"></div>
  </section>
</div>
    <div class="postbit" id="326298" data-post-id="326298">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Agreed! Please add these suggestions to the documentation overhaul community suggestions issue if you don’t mind: <a href="https://github.com/ash-project/ash/issues/995#issuecomment-2077962211" class="inline-onebox" rel="noopener nofollow ugc">Community suggestions for documentation overhaul · Issue #995 · ash-project/ash · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="326298" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-326298" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="326298"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #39"></div>
  </section>
</div>
    <div class="postbit" id="326308" data-post-id="326308">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="TwistingTwists" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/TwistingTwists/120/21564_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  TwistingTwists
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Will do!</p>
<p>Din’t know there was a tracker somewhere !</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="326308" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ash-framework-3-0-release-candidates/62684/41">Post #40</a>
	                </div>
	            </div>
              <div id="likers-container-326308" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="326308"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>