I am using waterline ORM in sails.js. I have a user model and a model of other coins that maps to the user model.
//coins.js attributes: { name: 'string', // Associations userId: { model: 'user' } }
The request created for this model,
CREATE TABLE `coins` (`name` VARCHAR(255) , `userId` INT , `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `createdAt` DATETIME , `updatedAt` DATETIME )
The request should contain a foreign key constraint for userId, but it is not. Is there a workaround for this?
source share