gboat2.base.core.annotation
注释类型 Relations
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Relations
作用于 VO 类,进行数据库多表关联查询时,通过该注解标识各表间的关联关系。如:
@Relations(base = BidNoticeItem.class, value = {
@Relation(refer = BidNotice.class, referColumn = "bidNoticeId", baseColumn = "noticeId", type = RelationType.LEFT),
@Relation(refer = ProjectInfo.class, referColumn = "projectId", base = BidNotice.class, baseColumn = "projectId", type = RelationType.LEFT),
@Relation(refer = BidPackage.class, referColumn = "packageId", baseColumn = "packageId", type = RelationType.LEFT)
})
public class TenderNoticeVO extends BidNotice {
… …
}
- 从以下版本开始:
- 3.0
- 作者:
- lysming, 何明旺
- 另请参见:
Relation
base
public abstract Class<?> base
- 返回:
- 主表对应的 PO 类
value
public abstract Relation[] value
- 返回:
- 多表之间的关联关系
Copyright © 2014 广联达软件股份有限公司(Glodon Software Co., Ltd.). All rights reserved.