title: How to get one-to-one resultset from one-to-many relationship
body: <p>I have this two entities</p>
  <pre><code>@Entity
  @Table(name = &quot;holidays&quot;)
  public class Holiday implements Serializable{
  
      [other attributes]
  
      @OneToMany(fetch = FetchType.LAZY)
      @JoinTable(name = &quot;HOLIDAYS_COUNTRY&quot;, joinColumns = {@JoinColumn(name = &quot;ID_HOLIDAY&quot;),  inverseJoinColumns = {@JoinColumn(name = &quot;ID_COUNTRY&quot;)})
      private List&lt;Country&gt; country;
  }
  </code></pre>
  <pre><code>Entity(name = &quot;COUNTRY&quot;)
  @Proxy(lazy=false)
  public class Country implements Serializable {
  
      @Id
      @Column(name = &quot;country_id&quot;)
      private Long countryId;
      private String name;
      
  }
  </code></pre>
  <p>I'd like to retrieve a list of holidays with one country per holiday from the JPA repository, so that, for example, if a holiday has two countries I retrieve two holidays (copy of each other) with one (different) country each.
  Is it possible without modifying the entities, or without having to create two new ones?
  I know how to flatten the one-to-many resultset in Java, but it's very inefficient. I'd like to retrieve the flattened resultset directly from the repository</p>