users@glassfish.java.net

JPA: OneToMany relation not working against the enabled Filter

From: <glassfish_at_javadesktop.org>
Date: Wed, 08 Jul 2009 22:59:15 PDT

I am trying to use filters to dynamically filter the OneToMany associated data. I am using JPA for ORM and hibernate for persistence.

The issue is enabling the filter doesnot have any effect on the associated collection. Is tried LAZY loading as well. On googling I came across this post http://stackoverflow.com/questions/641388/can-i-specify-a-hibernate-relationship-with-a-filter, and the ORM using hibernate seem to work in this case.

I am attaching both cases as zip files here. HibernateFilter.java has the sample source whether the filter works and JPAFilter.zip is the case where it does not.

Please help and thanks in advance.
[Message sent by forum member 'anthos' (anthos)]

http://forums.java.net/jive/thread.jspa?messageID=354825