Following java doc
@Where
Where clause to add to the element Entity or target entity of a collection. The clause is written in SQL. A common use case here is for soft-deletes.
@WhereJoinTable
Where clause to add to the collection join table. The clause is written in SQL. Just as with {@link Where}, a common use case is for implementing soft-deletes.
It seems annotations can be used in same way in general:
|---------------------|-------------------|-------------------|
| |@Where | @WhereTable |
|---------------------|-------------------|-------------------|
|target elements |TYPE, METHOD, FIELD|TYPE, METHOD, FIELD|
|---------------------|-------------------|-------------------|
|Retention |RUNTIME |RUNTIME |
|---------------------|-------------------|-------------------|
|properties |clause |clause |
|---------------------|-------------------|-------------------|
And as result I've been really confused how I should know which annotation I should use for Relation field. I can't find difference between using of @Where
and @WhereJoinTable
. Both of them can replace each other, am I right?