I'm using the Sequelize.js framework. to perform queries on the database, the result of the find function returns an object with 3 methods: success , error and complete
Ex:
models.ItensPedido.findAll( {where : {...
I started porting Node.js recently and I'm using the division of logic into modules. I have UserSessionController that validates if the user session is still valid:
module.exports.getUserSession = function ( userToken ) {
mod...
Is there a way, or some nice package, to work with user profiles for access to certain REST API endpoints as per their permission? I'm using NodeJS + Express + SequelizeJS as ORM.
I'm having an error in the return of a Mutation . Apparently it can not read the id field, but the object I'm sending to GraphQL has this field, and since I'm new to GraphQL I did not understand what the error means.
The error:
{
"e...
Hello, I want to do a search inside several tables, for example:
SELECT * from tab1
INNER JOIN tab2 ON tab1.tab2_id = tab2.id
WHERE tab1.name LIKE '%blabla%' or tab2.title
LIKE '%blablabla%'
How would you do this query with S...
When I try to start my project, it gives the following error:
D:\www\nodejs\master>node bin/www
module.js:472
throw err;
^
Error: Cannot find module 'sequelize'
at Function.Module._resolveFilename (module.js:470:15)
at Func...
I have the following relation with the sequelize
// Tasks.js
sequelize.models.tasks.belongsTo(sequelize.models.users, {
foreignKey: {
type: DataTypes.INTEGER,
field: 'ASSIGNEE',
allowNull: true
},
as: 'assignee'
});
s...
I have an API that I used with MySQL, but I had to switch to SQL Server. Unfortunately I've never used SQL Server, I do not know if I need to download something to get it. The API was done in JS. The configuration of the sequelize of my API with...
I'm having the following error when trying to create a table:
const User = app.db.sequelize.define ('user', {
TypeError: Can not read property 'sequelize' of undefined
My folder structure:
Myconfigurationfile(server.js)mo...
Does anyone know how to connect the plugin "sequelize" nodejs to connect to an instance of google cloud. I already created the instance in mysql everything is ready missing only the connection.
var sequelize = new Sequelize('database_name', 'u...