eggjs / eggjs/egg

sequelize operatorsAliases

Open
#4,211 8 comments 1 reaction 0 assignees View on GitHub
Inactive
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

## What happens?

```
// config.default.js
const Op = require('sequelize').Op;
// "egg-sequelize": "^5.2.1",
exports.sequelize = {
dialect: 'mysql',
timezone: '+08:00',
operatorsAliases: {
$eq: Op.eq,
$ne: Op.ne,
$gte: Op.gte,
$gt: Op.gt,
$lte: Op.lte,
$lt: Op.lt,
$not: Op.not,
$in: Op.in,
$notIn: Op.notIn,
$is: Op.is,
$like: Op.like,
$notLike: Op.notLike,
$iLike: Op.iLike,
$notILike: Op.notILike,
$regexp: Op.regexp,
$notRegexp: Op.notRegexp,
$iRegexp: Op.iRegexp,
$notIRegexp: Op.notIRegexp,
$between: Op.between,
$notBetween: Op.notBetween,
$overlap: Op.overlap,
$contains: Op.contains,
$contained: Op.contained,
$adjacent: Op.adjacent,
$strictLeft: Op.strictLeft,
$strictRight: Op.strictRight,
$noExtendRight: Op.noExtendRight,
$noExtendLeft: Op.noExtendLeft,
$and: Op.and,
$or: Op.or,
$any: Op.any,
$all: Op.all,
$values: Op.values,
$col: Op.col,
},
};
```
`npm start` 执行报错
![image](https://user-images.githubusercontent.com/16641120/76163632-b778a000-6182-11ea-9d76-6f774ffc06c1.png)
`npm run dev` 执行正常
## 最小可复现仓库
> 请使用 `npm init egg --type=simple bug` 创建,并上传到你的 GitHub 仓库

## 复现步骤,错误日志以及相关配置

## 相关环境信息
- **操作系统**:macos
- **Node 版本**:12.14.1
- **Egg 版本**:2.24.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.