I've been experimenting with trying to use the filter feature of Hibernate from a stateless session bean but haven't managed to get it to work. Has anyone tried this and can give mesome pointers?
I inject the EntityManager as per usual in my stateless and then runthe following:-
Session session = ((HibernateSession) this.manager).getHibernateSession(); session.enableFilter("byRole").setParameter("filterId", new Long(400));
@FilterDef(name = "byRole", parameters = {@ParamDef(name = "filterId", type = "long") }) @Filter(name = "byRole", condition = "id > :filterId")
"ryoung2504" wrote:
org.hibernate.Query has a method on it called getNamedParameters(),
it would be nice if this could make it through to javax.persistence.Query in the ejb3 spec.