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)
|
@Column(isLogicDelete = true)
|
||||||
private Boolean isDelete;
|
private Boolean isDelete;
|
||||||
|
|
||||||
|
@Column(ignore = true)
|
||||||
|
private String anotherColumn;
|
||||||
|
|
||||||
// private Gender gender;
|
// private Gender gender;
|
||||||
//
|
//
|
||||||
// public Gender getGender() {
|
// public Gender getGender() {
|
||||||
@ -95,6 +98,14 @@ public class Account extends BaseEntity<String, Long, String> {
|
|||||||
isDelete = delete;
|
isDelete = delete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAnotherColumn() {
|
||||||
|
return anotherColumn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnotherColumn(String anotherColumn) {
|
||||||
|
this.anotherColumn = anotherColumn;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Account{" +
|
return "Account{" +
|
||||||
@ -103,6 +114,7 @@ public class Account extends BaseEntity<String, Long, String> {
|
|||||||
", age=" + age +
|
", age=" + age +
|
||||||
", birthday=" + birthday +
|
", birthday=" + birthday +
|
||||||
", isDelete=" + isDelete +
|
", isDelete=" + isDelete +
|
||||||
|
", anotherColumn=" + anotherColumn +
|
||||||
// ", roles=" + roles +
|
// ", roles=" + roles +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
# DataSource Config
|
# DataSource Config
|
||||||
#spring:
|
spring:
|
||||||
# # h2:
|
# # h2:
|
||||||
# # console:
|
# # console:
|
||||||
# # enabled: true
|
# # enabled: true
|
||||||
# datasource:
|
datasource:
|
||||||
## driver-class-name: com.mysql.cj.jdbc.Driver
|
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://localhost:3306/flex_test
|
url: jdbc:mysql://localhost:3306/flex_test
|
||||||
# username: root
|
username: root
|
||||||
# password: 123456
|
password: 12345678
|
||||||
# driver-class-name:
|
# driver-class-name:
|
||||||
# datasource:
|
# datasource:
|
||||||
# driver-class-name: org.h2.Driver
|
# driver-class-name: org.h2.Driver
|
||||||
@ -36,13 +36,13 @@
|
|||||||
# url: jdbc:mysql://localhost:3306/flex_test
|
# url: jdbc:mysql://localhost:3306/flex_test
|
||||||
# username: root
|
# username: root
|
||||||
# password: 12345678
|
# password: 12345678
|
||||||
mybatis-flex:
|
#mybatis-flex:
|
||||||
datasource:
|
# datasource:
|
||||||
ds1:
|
# ds1:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/flex_test
|
# url: jdbc:mysql://127.0.0.1:3306/flex_test
|
||||||
username: root
|
# username: root
|
||||||
password: 123456
|
# password: 123456
|
||||||
ds2:
|
# ds2:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/flex_test
|
# url: jdbc:mysql://127.0.0.1:3306/flex_test
|
||||||
username: root
|
# username: root
|
||||||
password: 123456
|
# password: 123456
|
||||||
|
|||||||
@ -178,4 +178,9 @@ class AccountMapperTest {
|
|||||||
System.out.println(account);
|
System.out.println(account);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testIgnoreColumn() {
|
||||||
|
accountMapper.selectListByQuery(QueryWrapper.create());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user