@Inherited @Retention(value=RUNTIME) @Target(value=FIELD) public @interface RelationOneToMany
| Modifier and Type | Required Element and Description |
|---|---|
String |
targetField
目标实体类的关联属性。
|
| Modifier and Type | Optional Element and Description |
|---|---|
String |
dataSource
默认使用哪个数据源,若系统找不到该指定的数据源时,默认使用第一个数据源。
|
String |
extraCondition
查询时,追加的额外条件。
|
String |
joinSelfColumn
中间表与当前表的关联字段,一对一的关系是通过通过中间表维护时,需要添加此项配置。
|
String |
joinTable
中间表名称,一对一的关系是通过通过中间表维护时,需要添加此项配置。
|
String |
joinTargetColumn
目标表的关联字段名称,一对一的关系是通过通过中间表维护时,需要添加此项配置。
|
long |
limit
现在查询的数据量。
|
String |
mapKeyField
当映射是一个 map 时,使用哪个内容来当做 map 的 Key
|
String |
orderBy
查询排序。
|
String[] |
selectColumns
查询(加载)指定的列
|
String |
selfField
当前实体类的属性。
|
String |
selfValueSplitBy
当前字段值根据字符串分割
|
String |
targetSchema
目标实体类对应的表的 schema 模式。
|
String |
targetTable
目标实体类对应的表名。
|
String |
valueField
目标对象的关系实体类的属性绑定
|
public abstract String targetField
public abstract String selfField
public abstract String selfValueSplitBy
public abstract String targetSchema
目标实体类对应的表的 schema 模式。
如果目标实体类没有使用 @Table(schema = "...") 指定 schema 时,
需要在这里指定对应表的 schema 值。一般关联数据不是 entity 对象,而是 vo、dto
等需要配置此项。
public abstract String targetTable
目标实体类对应的表名。
如果目标实体类没有使用 @Table(value = "...") 指定表名时,
需要在这里指定对应表的表名。一般关联数据不是 entity 对象,而是 vo、dto
等需要配置此项。
public abstract String valueField
当字段不为空串时,只进行某个字段赋值(使用对应字段类型接收)
public abstract String mapKeyField
public abstract String joinTable
public abstract String joinSelfColumn
public abstract String joinTargetColumn
public abstract String extraCondition
public abstract String[] selectColumns
public abstract String orderBy
public abstract String dataSource
Copyright © 2024. All rights reserved.