Comments (2)
当前midwayjs-cool-core已更新到3.2.26;修复了相关问题。
如若需要多数据库支持需配置四个地方:
@CoolController( { api: ['add', 'delete', 'update', 'info', 'list', 'page'], entity: {entityKey:DemoAppGoods1Entity,connectionName: 'test'}, listQueryOp: { keyWordLikeFields: ['title'], }, }, { middleware: [], } )
@EntityModel('demo_app_goods',{ connectionName: 'test'})
@InjectEntityModel(DemoAppGoods1Entity,'test')
config.orm = { default:{ type: 'mysql', host: '127.0.0.1', port: 3306, username: 'midway', password: '123123', database: 'midway', // 自动建表 注意:线上部署的时候不要使用,有可能导致数据丢失 synchronize: true, // 打印日志 logging: true, // 字符集 charset: 'utf8mb4', }, test:{ type: 'mysql', host: '127.0.0.1', port: 3306, username: 'cool', password: '123123', database: 'dash', // 自动建表 注意:线上部署的时候不要使用,有可能导致数据丢失 synchronize: true, // 打印日志 logging: true, // 字符集 charset: 'utf8mb4', } }
from cool-admin-midway.
需要再Controller也指定连接名
@CoolController( { api: ['add', 'delete', 'update', 'info', 'list', 'page'], entity: { entityKey: DemoAppGoods1Entity, connectionName: 'test' }, listQueryOp: { keyWordLikeFields: ['title'], }, }, { middleware: [], } )
from cool-admin-midway.
Related Issues (20)
- 新版本,兼容Mysql、PostgreSQL、Sqlite 非管理员用户,登录获取菜单有问题 HOT 4
- sqlite不支持json格式字段,当使用slqite时,插件系统功能受影响
- 建议插件增加安装时执行插件__install__,卸载时执行__uninstall__函数,用于插件内部进行安装卸载的自定义操作 HOT 2
- 模块的加载与否可以通过配置文件设置
- 请问一下,这个项目支持单文件构建吗? HOT 1
- 7.1 使用 sqlite 时区问题 HOT 1
- 上传返回的图片路径是不是不太对? HOT 1
- 为什么 onetomany manytoone 无效 HOT 1
- v7的本地开发遇到的关于swagger没有参数
- 请问支持多表关联查询API吗?有没有例子 HOT 1
- 最新7.X 配置多数据源,报错 HOT 2
- dev启动报错 HOT 2
- 有没有计划支持mongoDB? HOT 1
- 这个项目最新版本V7.1.0怎么打包部署? HOT 1
- Midway 有群组吗 HOT 1
- 一个用户分配多个角色后,登录该用户查询角色列表报错
- 微信插件问题
- 使用docker部署,报错 HOT 1
- cool-admin-midway-7.x构建docker镜像报错 HOT 2
- upload 在使用 key 定义文件名的时候没有校验文件后缀 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cool-admin-midway.