Questions tagged as 'sequelize.js'

2
answers

Group by a field and see all the values of each record - SQL

I need to group by date a table with several dates with a specific value for each date. For example: 01/01/2016 10 01/01/2016 20 01/01/2016 30 02/01/2016 40 02/01/2016 50 ... The result should be: 01/01/2016 10 20 30 02/01/2016 40 50 T...
asked by 09.01.2017 / 19:15
3
answers

Error in Sequelize SQL query

I have this query: where: { $or: { $and: { mes: mes, any: any }, $and: { dia: 1, mes: 1 + Numbe...
asked by 10.03.2017 / 17:36
2
answers

How to modify the structure of a table with sequelize without deleting the data?

I have a model made with sequelize , I can not delete the data from the institution table, but now I have to add a day field. I've already tried sequelize.sync but it does not modify the structure of the table. and sequelize.sync...
asked by 11.07.2017 / 16:10
1
answer

Function Update Massive sequelize - Node

Good, I am trying to make a massive update to an MSSQL database from Node using sequelize. I still do not understand very well all this of the Promises, .then () etc. What I'm needing is a function called by POST, which receives an array of J...
asked by 30.05.2017 / 16:12
0
answers

Compare that a dates in timestamptz format, PostgreSQL, Sequelize

I'm having problems comparing two dates in timestamptz, I have a table with a field expiration date and I need to compare, that a date is not greater than the expiration date in the table, I'm using Sequelize let ahora = new Date(); function v...
asked by 24.12.2018 / 19:32
1
answer

Postgresql consultations with Sequelize stop working suddenly

I am currently in charge of a system developed in NodeJS, which uses PostgreSQL as a database, and we access it using the Sequelize ORM, all this in the Heroku platform. The problem I face is that, at a certain point, I tried to make a new de...
asked by 10.03.2017 / 13:54
0
answers

Error updating sequelize 4.40 in my project

I am developing a platform in which I updated sequelize to version 4.40 and it tells me the following error.    error: TypeError: Can not read property 'name' of undefined       at Function._validateIncludedElement (C: \ Users \ Zrismart23 \...
asked by 29.10.2018 / 17:34
0
answers

Sequelize does not validate my model

I'm new to trying to program and started with this framework called sequelize to make a connection to a database. with sequelize-cli create the following model called users to modify it to add some validations and stay as follows: 'use stri...
asked by 24.09.2018 / 21:02
1
answer

How to pass data between Includes in the same query of sequelize?

I have a problem with sequelize, I need to consult several tables in the same query, these are nested with Include: [] so fine, but I need to pass the result of a nested table (coins) to another table of another include (prices), since with re...
asked by 23.09.2018 / 19:51
0
answers

Sequelizejs include on relating to several fields

I'm trying to relate some tables with sequelizejs. Table 1 has a field with an ID that is used for the relationship and table 2 has 2 fields for the relationship, one is module (string) and the ID for the relationship. The MySQL syntax wou...
asked by 10.09.2018 / 16:01