Reputation: 5230
I am developing a sails.js app with MySQL. I am using the out of the box waterline ORM which comes with sails.js. According to this post, waterline does not create foreign key constraints in the manner you describe. It only creates the associated field. Is it safe to proceed with waterline and go ahead and create tables?
Upvotes: 3
Views: 684
Reputation: 3586
Yes, it is safe. Foreign keys prevent to insert values with id you don't have in related table, but on the other hand when you delete id, they don't delete rows from related tables, so there is no such event like cascade deletion and locking tables(or rows).
Upvotes: 2