title: Using @Filter with @ManyToOne relation
body: <p>I'm using Hibernate 3.6.7-Final and Spring 3.0.5.</p>
  
  <p>I have entity like this</p>
  
  <pre><code>@Entity
  public class Foo {
      @ManyToOne
      private Bar bar;
  }
  
  @Entity
  public class Bar {
      @Column
      String group;
  }
  </code></pre>
  
  <p>How can I use <code>@Filter</code> in Foo where I want to get all <code>Foo</code>'s that have <code>Bar</code> with <code>group = :group</code>? This is supposed to be a security constraint.</p>
  
  <p>Tryied just setting <code>@Filter(name = "groupFilter", condition = "group = :group")</code> at the attribute <code>bar</code> from<code>Foo</code> but it didn't work. Does hibernate have support for this or Filter only works at entity/collection level? Will I have to change all my HQLs to add this security constraint?</p>