Using AF 2 m5 Struts full source.  I am trying to add a filter to a join
table that will filter for an active date range.

I added for the class
@FilterDef(name="effectiveDateInfo)

I added for the attribute which has a @OneToOne mapping
@FilterJoinTable(name="effectiveDateInfo", condition="'2006-10-30' =
effectiveDate")

For the Dao class I tried
getSession().enableFilter("effectiveDate");
and
getHibernateTemplate().setFilterName("effectiveDate");

I tried both
Query q = session.createQuery("from Class where id=" + id);
ArrayList<Class> list = (ArrayList<Class>) q.list();
and
ArrayList<Class> list = (ArrayList<Class>) getHibernateTemplate().find("from
Class where id=?", id);


These all run but the filter does not appear to work.  Any ideas/suggestions
would help.  Thanks in advance.

Reply via email to