balderdashy/sails
View on GitHubProblem using multiple adapters in a single sails application
Open
#6,956 opened on Feb 26, 2020
help wantedmongoormsails-disktry this out please
Description
Node version: 12.10.0 Sails version (sails): 1.2.3 ORM hook version (sails-hook-orm): 2.1.1 Sockets hook version (sails-hook-sockets): 2.0.0 Uploads hook version (sails-hook-uploads): DB adapter & version (e.g. sails-mysql@5.55.5): sails-mongo@1.1.0
and I have 2 models - 1) post 2) comment. Here are the model definitions:
/**
* Post.js
*/
module.exports = {
attributes: {
nameOnMenu: { type: 'string', required: true },
price: { type: 'string', required: true }
},
};
and here is the comment model :
/**
* Comment.js
*/
module.exports = {
datastore: 'mongo',
attributes: {
nameOnMenu: { type: 'string', required: true },
price: { type: 'string', required: true }
},
};
so I am trying to connect comment model with mongo adapter and post model to default adapter. But when I run "sails lift", it shows the below error:

What's wrong am I doing?