title: JoinColumn on column created from another join
body: <p>I have entity User which contains field with entity Actor which contains 
  field with entity Product.
  Now I want User in database to have information about product id that's being stored in Actor using @JoinColum on Product.
  For better clarification, some code:</p>
  
  <pre><code>   @Entity
      public class User {
          @ManyToOne
          @JoinColumns(value = {@JoinColumn(name = "actor_id", referencedColumnName = "id"),
                  @JoinColumn(name = "product_id", referencedColumnName = "product_id")})
          private Actor actor; 
  
    public Actor getActor() {
          return actor;
      }
  
      public void setActor(Actor actor) {
          this.actor = actor;
      }
      }
  
      @Entity
      public class Actor {
          @ManyToOne
          @JoinColumn(name = "product_id")
          private Product product;
      }
  </code></pre>
  
  <p>In database it creates table "users" with "actor_id" and "product_id" and table "actors" with column "product_id".</p>
  
  <p>Using Spring Data Repository's userRepository.findAll() method I end up with ClassCastException and the following message:</p>
  
  <blockquote>
    <p>Actor_$$_jvst485_0 cannot be cast to java.io.Serializable</p>
  </blockquote>
  
  <p>Any ideas how to fix it?</p>