In xml to set up a filter on the target table of a many to many, you set the filter element inside the <many-to-many> element

To support that in annotations, I could do

1.
@Filter (pointing to the association table or the target table if a @OneToMany @JoinColumn) @FilterManyToMany (@FilterTargetEntity) (pointing to the association table or the target table if a @OneToMany @JoinTable | @ManyToMany)

or
2.
@Filter (pointing to the target table)
@FilterJoinTable (pointing to the association table)

I like 2. better, it is more consistent esp when you realize that @OneToMany can use a join table just by changing an annotation. 2. would require a break to the users playing with @Filter and associations involving join tables.

WDYT?
Any annotation better name are welcome too.



_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to