balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.85k stars 1.95k forks source link

find method in sails.js model #7327

Closed iamkhanhh closed 8 months ago

iamkhanhh commented 8 months ago

Hi everyone, I have a problem with find method and my 'Courses' model. Here is my code : code-snapshot and my table courses in mysql is defined : DROP TABLE IF EXISTS courses; CREATE TABLE courses ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, level VARCHAR(20) NOT NULL, language VARCHAR(20) NOT NULL, ratings FLOAT(2) NOT NULL, prices FLOAT(2) NOT NULL, thumbnail TEXT NOT NULL, total_weeks INT NOT NULL, total_lessons INT NOT NULL, createdAt TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, updatedAt TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, author_id INT, FOREIGN KEY (author_id) REFERENCES users(id) ); when I call function testGetMyLearning, I got : image Although others models are still work.

sailsbot commented 8 months ago

@iamkhanhh Thanks for posting! We'll take a look as soon as possible.

In the mean time, there are a few ways you can help speed things along:

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.