[feat]: 是否可以提供一个配置项,不转换字段名映射关系
wmui opened this issue · comments
wmui commented
默认是把驼峰转为下划线,虽然可以通过columnName
进行命名覆盖,但是如果表很多这种方式感觉有点麻烦:
userName: {
type: STRING,
columnName: 'userName',
validate: {
notNull: true,
notEmpty: true,
},
},
userPwd: {
type: STRING,
columnName: 'userPwd',
validate: {
notNull: true,
notEmpty: true,
},
},
所以希望可以通过一个配置项,允许不进行命名转换。
Chen Yangjian commented
new Realm({
define: { underscored: false },
});
试试这样
wmui commented
这么做可以♪(・ω・)ノ