在实体类里定义一个数据库不存在的字段

1、在mybatis中定义不存在字段

//引入
import org.springframework.data.annotation.Transient;
 
//使用
    @Transient
    private List<AwardGuidelineFile> awardGuidelineFileList;

2、在jpa项目中定义不存在字段

//引入包
import javax.persistence.Transient;
 
//使用
    @Transient
    protected FsCatalog bsParent;

3、在mybatis-plus中定义不存在字段

@TableField(exist = "false")
private String name;

评论

暂无

添加新评论