title: After updating an entity that has Lazy Loaded attributes JOIN FETCH has no effect
body: <p>We have an entities like this:</p>
  
  <pre><code>public User {
      @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
      @JoinColumn(name = "user_id", insertable = true, updatable = true)
      @ElementDependent
      private List&lt;Item_x&gt; item_x_list = new ArrayList&lt;Item_x&gt;();
  }
  
  public Item_x {
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "user_id", insertable = true, updatable = true)
      @Element(name = "user_id", required = false)
      private Users user;
  }
  </code></pre>
  
  <p>Whenever I add/remove items to User.item_x_list and then persist the User entity using em.merge(User.INSTANCE) the Item_x.user property is NULL.</p>
  
  <p>I am loading the Item_x.user property with a JOIN FETCH query to make sure the attribute is loaded (when I need it). However: the Item_x.user property is NULL even with FETCH JOIN if you have performed a merge on the User Entity.</p>
  
  <p>I tried to workaround by refreshing the Item_x.INSTANCE
  but when I call:</p>
  
  <pre><code>em.refresh(Item_x.Instance);
  </code></pre>
  
  <p>=> user is null.</p>
  
  <p>Looking in the database I of course can see that the user is NOT null in the Item_x.</p>
  
  <p>How can I force OpenJPA to correctly load the user in Item_x ?
  Why is OpenJPA not filling correctly the Item_x.user property / ignores the JOIN FETCH statement?</p>