软件编程
位置:首页>> 软件编程>> java编程>> mybatis-plus排除非表中字段的操作

mybatis-plus排除非表中字段的操作

作者:J  发布时间:2022-04-22 03:48:41 

标签:mybatis-plus,排除,字段

使用 transient 修饰

private transient String noColumn;

使用 static 修饰

private static String noColumn;

使用 TableField 注解

@TableField(exist=false)

private String noColumn;

补充知识:Mybatis plus @TableName实体中添加非数据库字段报错,如增加请在字段上加注解 @TableField(exist = false)

否则会出现以下异常:

### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '***' in 'field list'

来源:https://www.cnblogs.com/jsersudo/p/10474804.html

0
投稿

猜你喜欢

手机版 软件编程 asp之家 www.aspxhome.com