title: How to apply hibernate filter for map datatype?
body: <p>Is there a way to apply filter on map type attribute in a class using annotations? I have done something like below but the filter is not getting applied</p>
  
  <pre><code>public class EntityA
  {
  @id
  @GeneratedValue
  @Column(name="id")
  private Long id;
  
  @OneToMany(mappedBy="EntityA")
  @MapKeyColumn(name = "entityB_id")
  @Filter(name = "percentFilter", condition="MODEL_PERCENT&gt; :percent")
  private Map&lt;Long, EntityB&gt; entityBMap;
  } 
  
  public class EntityB
  {
  @Column(name = "MODEL_PERCENT")
  private BigDecimal modelPercent;
  
  @ManyToOne
  @joincolumn(name="entityA_id") 
  private EntityA entityA; 
  }
  </code></pre>
  
  <p>But if i change the <strong>map</strong> attribute to <strong>list</strong> as below, the filter works</p>
  
  <pre><code>@OneToMany(mappedBy="EntityA")
  @MapKeyColumn(name = "entityB_id")
  @Filter(name = "percentFilter", condition="MODEL_PERCENT&gt; :percent")
  private Map&lt;Long, EntityB&gt; entityBMap;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>@OneToMany(mappedBy="EntityA")
  @JoinColumn(name = "entityA_id")
  @Filter(name = "percentFilter", condition="MODEL_PERCENT&gt; :percent")
  private List&lt;EntityB&gt; entityBList;
  </code></pre>
  
  <p>So i guess i need some help on annotating the map attribute such that the filter works. Any suggestion or sample code would be of great help. Thanks.</p>