All I could find is the following
When the collection use an association table as a relational representation, you might want to apply the filter condition to the association table itself or to the target entity table. To apply the constraint on the target entity, use the regular @Filter annotation. However, if you wan to target the association table, use the @FilterJoinTable annotation.
@OneToMany
@JoinTable
//filter on the target entity table
@Filter(name="betweenLength", condition=":minLength <= length and :maxLength >= length")
//filter on the association table
@FilterJoinTable(name="security", condition=":userlevel >= requredLevel")
public Set<Forest> getForests() { ... }
So I did the following om my risk class:
public class Risk extends BaseEntity {
@JoinColumn(name = "objective", referencedColumnName = "id")
@ManyToOne(fetch = FetchType.EAGER)
@FilterJoinTable(name="withoutArchiveDate", condition="archiveDateTime is null")
private Objective objective;
no luck so far
Regards vaughn
|