1 Reply Latest reply on Dec 11, 2008 9:49 AM by jfrankman

    @Filter don`t work on jboss

    Yury Vetlugin Newbie

      Hi everybody,
      I have a simple test application with @Filter feature. The problem is the filter don`t work (resulting SQL do not include filter condition).

      The entity:

      @Table(name = "test_a_table")
      @FilterDef(name = "valueTest")
      @Filter(name = "valueTest", condition = "(value = 'test')")
      public class A {
       private String id;
       private String value;

      public class ADaoImpl implements ADao {
       private EntityManagerFactory emf;
       public Session getSession() {
       return (Session) emf.createEntityManager().getDelegate();
       public List<A> getAll() {
       return getSession()

      Result SQL Code:
       /* criteria query */ select
       this_.id as id72_0_,
       this_.value as value72_0_
       test_a_table this_

      Here is maven project zipped: http://6709.su/test.zip (8KB)

      PS: Jboss 4.2.2.GA (hibernate 3.2.4.sp1)