@Documented @Retention(value=RUNTIME) @Target(value=FIELD) public @interface Fetch
| 限定符和类型 | 必需的元素和说明 |
|---|---|
Class |
target
目标,相当于表
|
String |
targetProperty
目标属性,相当于关联列 用于条件
|
| 限定符和类型 | 可选元素和说明 |
|---|---|
String |
column
Fetch列
column 和 property 二选一,column优先
|
int |
limit
限制条数
|
boolean |
multiValueErrorIgnore
1 对 1 多条时,发现多条不报错
|
String |
orderBy
用于结果排序 例如 "xx desc,xx2 desc"; 其中 xx xx2 均为 实体类属性,不是列,多个逗号分割
可以动态 例如:[{id} desc,{createTime} asc]等
|
String |
property
Fetch 源实体类的属性
property + source + storey 组合 用于获取列
|
Class |
source
Fetch property 对应的实体类
|
int |
storey
存储层级
|
String |
targetSelectProperty
目标select属性
用于返回单列的情况
可以动态select 例如:[count({id})] or [{id}+{name} as aa]等
|
public abstract Class target
public abstract String targetProperty
public abstract String column
public abstract String property
public abstract Class source
public abstract String targetSelectProperty
public abstract String orderBy
Copyright © 2024. All rights reserved.