mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
test: 测试 ignore 属性解析。
This commit is contained in:
parent
5829c8fb5b
commit
07362c87ab
@ -45,6 +45,9 @@ public class Account extends BaseEntity<String, Long, String> {
|
||||
@Column(isLogicDelete = true)
|
||||
private Boolean isDelete;
|
||||
|
||||
@Column(ignore = true)
|
||||
private String anotherColumn;
|
||||
|
||||
// private Gender gender;
|
||||
//
|
||||
// public Gender getGender() {
|
||||
@ -95,6 +98,14 @@ public class Account extends BaseEntity<String, Long, String> {
|
||||
isDelete = delete;
|
||||
}
|
||||
|
||||
public String getAnotherColumn() {
|
||||
return anotherColumn;
|
||||
}
|
||||
|
||||
public void setAnotherColumn(String anotherColumn) {
|
||||
this.anotherColumn = anotherColumn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Account{" +
|
||||
@ -103,6 +114,7 @@ public class Account extends BaseEntity<String, Long, String> {
|
||||
", age=" + age +
|
||||
", birthday=" + birthday +
|
||||
", isDelete=" + isDelete +
|
||||
", anotherColumn=" + anotherColumn +
|
||||
// ", roles=" + roles +
|
||||
'}';
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
# DataSource Config
|
||||
#spring:
|
||||
spring:
|
||||
# # h2:
|
||||
# # console:
|
||||
# # enabled: true
|
||||
# datasource:
|
||||
## driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://localhost:3306/flex_test
|
||||
# username: root
|
||||
# password: 123456
|
||||
datasource:
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/flex_test
|
||||
username: root
|
||||
password: 12345678
|
||||
# driver-class-name:
|
||||
# datasource:
|
||||
# driver-class-name: org.h2.Driver
|
||||
@ -36,13 +36,13 @@
|
||||
# url: jdbc:mysql://localhost:3306/flex_test
|
||||
# username: root
|
||||
# password: 12345678
|
||||
mybatis-flex:
|
||||
datasource:
|
||||
ds1:
|
||||
url: jdbc:mysql://127.0.0.1:3306/flex_test
|
||||
username: root
|
||||
password: 123456
|
||||
ds2:
|
||||
url: jdbc:mysql://127.0.0.1:3306/flex_test
|
||||
username: root
|
||||
password: 123456
|
||||
#mybatis-flex:
|
||||
# datasource:
|
||||
# ds1:
|
||||
# url: jdbc:mysql://127.0.0.1:3306/flex_test
|
||||
# username: root
|
||||
# password: 123456
|
||||
# ds2:
|
||||
# url: jdbc:mysql://127.0.0.1:3306/flex_test
|
||||
# username: root
|
||||
# password: 123456
|
||||
|
||||
@ -178,4 +178,9 @@ class AccountMapperTest {
|
||||
System.out.println(account);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testIgnoreColumn() {
|
||||
accountMapper.selectListByQuery(QueryWrapper.create());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user