注释接口 JoinSql
Be different with
JoinTable, this annotation
is used by UNSTRUCTURED many-to-many mappings.
For example:
@ManyToMany
@JoinSql("SOME_FUN_1(%alias.FIELD_X) = SOME_FUN_2(%target_alias.FIELD_Y)")
List<Target> targets();
Applicable restrictions
- Can only be used with
ManyToMany - Cannot be used by remote association, so the microservice names of declaring type and target type must be same
- Cannot be optimized by `half-join`
- Cannot be cached
- Object tree with unstructured association can not be argument of save-command, otherwise, error will be raised
-
必需元素概要
所需元素
-
元素详细资料
-
value
String valueA sql fragment must contain `%alias` and `%target_alias`, returns a sql predicate describes how to join the current table referenced by `%alias` and target table referenced by `%target_alias`
-