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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cboebel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cboebel/120/735_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cboebel
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="isaac-rstor" data-post="11" data-topic="21768">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/isaac-rstor/48/13395_2.png" class="avatar"> isaac-rstor:</div>
<blockquote>
<p>Can you double check that your character encoding and collation is ok? Ecto’s MySQL doesn’t support certain of MySQL encoding types, and I remember having major problems with uuids that drove me up the wall (but were solvable - except when I had to interface with other databases at work) until I switched to postgres.</p>
</blockquote>
</aside>
<p>Good point, and one that is echoed here: <a href="https://forum.elixirforum.com/t/odd-binary-id-mismatch/14719/7" rel="nofollow">Odd Binary ID Mismatch</a></p>
<p>I did find that the table was encoded with latin1, so I did this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">ALTER TABLE replication_types CONVERT TO CHARACTER SET utf8;
</code></pre>
<p>I tried again. Same results, unfortunately.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125145" 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/ecto-mysql-and-uuid/21768/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-125145" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125145"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="125232" data-post-id="125232">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="isaac-rstor" data-post="11" data-topic="21768">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/isaac-rstor/48/13395_2.png" class="avatar"> isaac-rstor:</div>
<blockquote>
<p>I can’t be 100% sure but I recall values being trimmed at 3f as being diagnostic of the problem</p>
</blockquote>
</aside>
<p><code>3f</code> in ASCII is <code>?</code>. Looks like MySQL will replace characters that aren’t representable in the column’s character set with <code>?</code>:</p>
<aside class="onebox stackexchange" data-onebox-src="https://dba.stackexchange.com/questions/96265/mysql-silently-replaces-utf-chars-with-literal-question-marks">
  <header class="source">

      <a href="https://dba.stackexchange.com/questions/96265/mysql-silently-replaces-utf-chars-with-literal-question-marks" target="_blank" rel="noopener nofollow">dba.stackexchange.com</a>
  </header>

  <article class="onebox-body">
      <a href="https://dba.stackexchange.com/users/14447/fabio" target="_blank" rel="noopener nofollow">
    <img alt="Fabio" src="https://www.gravatar.com/avatar/d3096adc28daa2f0b01cfbe5b90a37db?s=256&amp;d=identicon&amp;r=PG" class="thumbnail onebox-avatar" width="256" height="256">
  </a>

<h4>
  <a href="https://dba.stackexchange.com/questions/96265/mysql-silently-replaces-utf-chars-with-literal-question-marks" target="_blank" rel="noopener nofollow">MySQL silently replaces UTF chars with literal question marks</a>
</h4>

<div class="tags">
  <strong>mysql, character-set, encoding, utf-8</strong>
</div>

<div class="date">
  asked by
  
  <a href="https://dba.stackexchange.com/users/14447/fabio" target="_blank" rel="noopener nofollow">
    Fabio
  </a>
  on <a href="https://dba.stackexchange.com/questions/96265/mysql-silently-replaces-utf-chars-with-literal-question-marks" target="_blank" rel="noopener nofollow">09:51PM - 25 Mar 15 UTC</a>
</div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125232" 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/ecto-mysql-and-uuid/21768/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-125232" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125232"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="125239" data-post-id="125239">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>don’t forget to also change the collation, try running this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">ALTER TABLE `replication_types` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125239" 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/ecto-mysql-and-uuid/21768/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-125239" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125239"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="125405" data-post-id="125405">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cboebel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cboebel/120/735_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cboebel
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="isaac-rstor" data-post="14" data-topic="21768" 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/isaac-rstor/48/13395_2.png" class="avatar"> isaac-rstor:</div>
<blockquote>
<p>don’t forget to also change the collation, try running this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">ALTER TABLE `replication_types` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci
</code></pre>
</blockquote>
</aside>
<p>I tried this (thank you for the suggestion) and received the same results.</p>
<p>Here’s what I don’t understand about these suggestions: This is a binary field (binary(16)). Why would things like collation and character set have any bearing on what’s stored in a binary field? I should be able to store anything in there, right? An image, for example. (Not that I would).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125405" 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/ecto-mysql-and-uuid/21768/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-125405" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125405"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="125407" data-post-id="125407">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cboebel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cboebel/120/735_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cboebel
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="al2o3cr" data-post="13" data-topic="21768">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/al2o3cr/48/3457_2.png" class="avatar"> al2o3cr:</div>
<blockquote>
<p><code>3f</code> in ASCII is <code>?</code> . Looks like MySQL will replace characters that aren’t representable in the column’s character set with <code>?</code> :</p>
</blockquote>
</aside>
<p>I agree it looks fishy, but I don’t understand why it would replace characters in a binary field. I should be able to put <em>anything</em> in there, right?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125407" 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/ecto-mysql-and-uuid/21768/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-125407" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125407"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="125412" data-post-id="125412">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="axelson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/axelson/120/26351_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  axelson
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Scenic Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="cboebel" data-post="16" data-topic="21768">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cboebel/48/735_2.png" class="avatar"> cboebel:</div>
<blockquote>
<p>I agree it looks fishy, but I don’t understand why it would replace characters in a binary field. I should be able to put <em>anything</em> in there, right?</p>
</blockquote>
</aside>
<p>Yeah, I would expect that as well, but that doesn’t necessarily mean it is actually true in reality.</p>
<p>Can you show the output of <code>SHOW FULL COLUMNS FROM table_name;</code>? Although I’m not sure if we’d learn anything else beyond <code>binary(16)</code>. Or if you could create a sample project that reproduces the issue, that would be helpful in tracking it down.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125412" 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/ecto-mysql-and-uuid/21768/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-125412" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125412"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="125431" data-post-id="125431">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m not 100% sure but it probably has to do with the ecto adapter.  I think SQL’s put binary data into themselves using, say, stdin and if your adapter is sending non-texty data on stdin, strange things happen if the encodings don’t match.  Quite a bit of an SQL query must be in text, so mix &amp;match is bound to be hairy, e.g. how POST http queries can get strange esp. with multipart form encoding</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125431" 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/ecto-mysql-and-uuid/21768/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-125431" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125431"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="125499" data-post-id="125499">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cboebel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cboebel/120/735_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cboebel
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="axelson" data-post="17" data-topic="21768">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/axelson/48/26351_2.png" class="avatar"> axelson:</div>
<blockquote>
<p>Can you show the output of <code>SHOW FULL COLUMNS FROM table_name;</code> ? Although I’m not sure if we’d learn anything else beyond <code>binary(16)</code> . Or if you could create a sample project that reproduces the issue, that would be helpful in tracking it down.</p>
</blockquote>
</aside>
<p>Here’s the output from <code>show full columns</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">+-------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field       | Type         | Collation         | Null | Key | Default | Extra | Privileges                      | Comment |
+-------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| id          | binary(16)   | NULL              | NO   | PRI | NULL    |       | select,insert,update,references |         |
| name        | varchar(255) | latin1_swedish_ci | YES  | UNI | NULL    |       | select,insert,update,references |         |
| inserted_at | datetime     | NULL              | NO   |     | NULL    |       | select,insert,update,references |         |
| updated_at  | datetime     | NULL              | NO   |     | NULL    |       | select,insert,update,references |         |
+-------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
</code></pre>
<p>I’ll do a small demonstration project later today and put it up somewhere.</p>
<p>Thank you for your help.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125499" 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/ecto-mysql-and-uuid/21768/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-125499" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125499"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="125531" data-post-id="125531">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Apparently you might want to try utf8mb4</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://mathiasbynens.be/notes/mysql-utf8mb4">
  <header class="source">

      <a href="https://mathiasbynens.be/notes/mysql-utf8mb4" target="_blank" rel="noopener nofollow ugc">mathiasbynens.be</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://mathiasbynens.be/notes/mysql-utf8mb4" target="_blank" rel="noopener nofollow ugc">How to support full Unicode in MySQL databases · Mathias Bynens</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Also try the settings in /etc/my.cnf, I suspect especially the client one might be important.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="125531" 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/ecto-mysql-and-uuid/21768/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-125531" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="125531"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="128643" data-post-id="128643">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi,<br>
I’m having a similar issue with mysql and uuid, but can’t find a solution.<br>
Creating and reading an entry works in about 80% of the time, but in the other cases the id in the database will be different than the one in the changeset.</p>
<p>i wrote a simple test that inserts and then reads again like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def failtest(conn, _params) do
    insert(conn, 0) |&gt; index(nil)
  end

  def insert(conn, count)do
    changeset = Picture.changeset(%Picture{}, %{name: "test"&lt;&gt;Integer.to_string(count)})
    Repo.insert(changeset)
    |&gt; case do
      {:ok, picture} -&gt;
        cond do
          Repo.one(from p in Picture, where: p.id == ^picture.id) -&gt;
            if count &lt; 100 do
              insert(conn, count+1)
            else
              conn |&gt; put_flash(:info, "finished")
            end
          true -&gt;
            conn |&gt; put_flash(:error, "couldn't find entry")
          end
      {:error, _param} -&gt;
        conn |&gt; put_flash(:error, "couldn't insert")
      end
  end
</code></pre>
<p>Usually it will abort somewhere between 2 and 15 entries created.</p>
<p>Does someone have an idea about 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="128643" 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/ecto-mysql-and-uuid/21768/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-128643" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="128643"
                     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 #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/21768/load_more?page=3">Load more posts (1 remaining)</a>
</div></template></turbo-stream>