Sails.js - 在模型中定义类型间隔的属性(Waterline ORM)

时间:2018-06-17 18:19:36

标签: node.js sails.js waterline sails-postgresql

我最近开始学习sails.js。目前正在进行一个侧面项目,我必须在模型中存储间隔。但我可以在官方文档中找到如何定义区间类型的属性。当我尝试将类型定义为stringjson时,我在查询时收到以下警告。

Warning: After transforming columnNames back to attribute names for model `video`,
 a record in the result has a value with an unexpected data type for property `duration`.
The corresponding attribute declares `type: 'json'` but instead
of that, the actual value is:
```
PostgresInterval { minutes: 5, seconds: 1 }

如何避免此警告?

0 个答案:

没有答案