Hi Yves,

ycharron wrote:
Hello,
  I'm trying to use a hibernate filter to limit child records of an
oneToMany association.

@Entity
public Class Parent {
... private Set<Child> childs = new HashSet<Child>();
...
@OneToMany (fetch=FetchType.EAGER)
        @JoinColumn(name = "fk_parentId")
        @Filter(name="validRecord",  condition=":field < value"
I'm no expert on Hibernate, but I'm wondering if your filter condition is right. Is "value" actually a column name in your Child entity? If not, it should be - from my reading of the hibernate docs, you need a column name in that part of your condition.

HTH,

Rob Hills
Waikiki, Western Australia


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to