-
手动维护的要这样,update({ name: 'Jhon', updateTime: new Date() }, { where: { id: 123 }})
然而它并不是 timestamp 类型。
-
thinkjs的orm可以独立出来在其他nodejs框架使用吗?
如在koa,express里面使用thinkjs-model 或者thinjs-mysql
-
将事务操作注释掉就没有问题,如果不注释就卡死。
```js
async createOrder(preOrder: PreOrder): Promise {
try {
// await this.startTrans();
const orderId = await this.add(preOrder.order);
if (thi…
-
## DESC
1. 新建demo项目
2. 修改pm2.json
` "exec_mode": "cluster",`
2. pm2 start pm2.json报错
`Error: can not use pm2 cluster mode, please change exec_mode to fork`
![屏幕快照 2019-08-27 下午5 10 10](https:…
-
https://thinkjs.org/zh-cn/doc/3.0/extend.html
文档里缺少ts的内容,比如我想扩展context,并且想让this含有正确的context提示,我是这么写的
```javascript
import { Context } from 'thinkjs'
interface myContext extends Context {
myPr…
-
版本很长时间没有更新了
-
如上面的标题,文档中没找到,希望加入faq
ThinkJS Version:
2.2.x
-
## DESC
### ENV
OS Platform:
Node.js Version:
ThinkJS Version:
### code
```js
async initMenuAction() {
let menuList = await this.model('home/home_menu').getMenuList();
let map…
-
## DESC
### ENV
OS Platform:
Node.js Version:
ThinkJS Version:
### code
```js
// your code here
```
### error message
```
// your error message here
```
### more descrip…
-
## DESC
我项目是多模块方式部署, `src/user` 用与用户登录之类的事物,代码如下:
```
// src/user/controller/base.js
/**
* 前置操作
*/
async __before() {
// 初始化用户信息
this.user = {};
//…