shamoq
shamoq
bug重现仓库:https://github.com/shamoq/vue-vben-admin/tree/bug/6559
收到,谢谢老师
@cycgit @popomore camelCase 这个参数,最新的egg框架里有了吗,请问在哪里配置,旨在支撑 ``` 数据库一般下划线字段。应用代码都驼峰 ```
@SF-Zhou 麻烦问下,app.js里访问不到sync方法,可能是因为什么。部分代码如下。 app.js ``` js // app.js module.exports = app => { app.beforeStart(function* () { //同步数据库表 console.log(`同步数据表:` + ( app.Sequelize.sync == null) ) app.Sequelize.sync() }); }; ``` ``` js //config/plugin.js...
@SF-Zhou 明白了,非常感谢,自己之前还是在model里写的,这样可以从model定义中分离出来。
@SF-Zhou 最近发现,原来挂载sequelize 的sync方法,被移植到了 app.Model.sync 这样可以同步所有表结构了。
@callmesoul 之前就是没找到sync方法挂在哪里,官方文档哪里有app.Model的定义,我还是无意中发现的。。。
@atian25 你好。咨询下,什么情况下单测里需要close,刚刚运行单测,会有这样的问题,单测代码如下 test/app/controller/home.test.js ``` js 'use strict'; const mm = require('egg-mock'); const assert = require('assert'); describe('test/app/controller/home.test.js', () => { let app; before(() => { app = mm.app(); return app.ready(); });...
@popomore 你说的应用是指controller和service等吗,我看楼上测的是helper方法,需要close。
@atian25 目前就一个。我是正准备写