Hello,
Is there a way to access attributes of an entity in a @FilterJoinTable clause ?
Something like :
Code:
class Bar{
@ManyToMany(cascade = CascadeType.ALL)
@FilterJoinTable(name = "fooFilter", condition = "foos_id in (select o.foo_id from Other o where o.bar_id = {alias}.id))
List<Foo> foos;
@Id
Long id;
}
I tried to use latest 4.1.5.SP1 version (cf. this discussion: http://www.mailinglistarchive.com/html/
[email protected]/2012-06/msg00018.html) and SqlFragmentAlias, no success (The problem remains : {alias} refers to the join table(Bar_Foo), not to the root Bar entity).
Thanks !