我正在使用sequelize / NodeJS,我需要在我的模型(Point)中有一个geomtric字段,我无法弄清楚如何使用它。
目前我有这个:
position: {
type: DataTypes.GEOMETRY('Point'),
allowNull: true
},
但我收到此错误:
TypeError: DataTypes.GEOMETRY is not a function
at module.exports (C:\Users\FilipeCosta\Desktop\FloraApp\server\models\Foto.js:22:23)
at Sequelize.module.exports.Sequelize.import (C:\Users\FilipeCosta\Desktop\FloraApp\server\node_modules\sequelize\lib\sequelize.js:626:32)
at C:\Users\FilipeCosta\Desktop\FloraApp\server\models\index.js:21:33
at Array.forEach (native)
at Object.<anonymous> (C:\Users\FilipeCosta\Desktop\FloraApp\server\models\index.js:20:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\FilipeCosta\Desktop\FloraApp\server\app.js:9:14)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
任何提示?