title: How do I fetch OneToMany mappedBy when creating the child entity before the parent?
body: <p>I have a model like this:</p>
  <pre><code>class Message {
  
      @Id
      private UUID id;
  
      // ...
  
      @OneToMany(mappedBy = &quot;messageId&quot;)
      private List&lt;Value&gt; values;
  }
  
  class Value {
      private UUID messageId;
  }
  </code></pre>
  <p>The <code>Value</code> entities are being created in a JPA session, then, in another session, I create a <code>Message</code> in which I provide the <code>id</code> myself (which matches the <code>messageId</code> of existing <code>Value</code>).</p>
  <p>After I have persisted the <code>Message</code>, when I try to call <code>getValues()</code> from it, I get <code>null</code>. What's the best way to solve this? Can I programmatically fetch the relation? Should I open another session?</p>