Skip to main content

All Questions

Tagged with
0 votes
1 answer
32 views

ORM Sequelize model.upsert() is not a function

Version sequelize 6.37.3 I try to upsert() myModel but the mehtod returns: TypeError: model.upsert is not a function my_model.controller.ts ... class MyModelController { private model: any; ....
rammi22's user avatar
  • 395
-1 votes
2 answers
84 views

MySQL insert query successful but not inserting into database table

I am working on a React/MySQL registration page. The insert query runs, but is not inserting into the database table. I am not sure why. In the backend folder, I have my server.js file: const ...
John Beasley's user avatar
  • 2,853
0 votes
1 answer
19 views

How do I search an entry in database by the same search phrase for two separate models with reference in sequelize?

I'm trying to make a search in a database for invoices. In the server request handler I have only one thing: searchPhrase. So I have to search invoice by serial number of the invoice, and also by ...
justelio19's user avatar
0 votes
0 answers
14 views

How to solve many-to-many relationship for inserting an element in Sequelize?

I have the following tables in my MySQL database: CREATE TABLE idi_ma_products ( id INT AUTO_INCREMENT PRIMARY KEY, title VARCHAR(200), image VARCHAR(255), created_date DATE, ...
Sebastian Narvaez's user avatar
0 votes
0 answers
28 views

Sequelize findAndCountAll with literal count and having clause and subquery getting column not found on subquery column for count,

Sequelize findAndCountAll with having clause and subquery getting column not found on subquery column for count, tried subQuery:false and subQuery:true but not worked, tried with finAll but i need ...
smzhzr's user avatar
  • 3
0 votes
1 answer
59 views

Encoding problem UTF-8 in docker backend image

i try to create mysql and nodejs express image when i run mysql and backend container and open my frontend english text can display but if data is thai text when i use mysql2 to fetch thai text the ...
SaRai's user avatar
  • 3
0 votes
0 answers
13 views

import 'exported' sql file into mysql database using node.js

I had one sql file which i want to import in my new database using node.js. I have tried multiple ways but no progress This error i receive when i try readFile approach Error executing SQL file: ...
The Dev's user avatar
  • 108
0 votes
1 answer
31 views

Stringified JSON data won't INSERT into mySQL(verified json format)

I'm not able to insert a JSON string into a mySQL table. CREATE TABLE registered ( id int NOT NULL AUTO_INCREMENT, name nvarchar(128) NOT NULL, panels JSON NOT NULL, PRIMARY KEY (id) );...
Jeri's user avatar
  • 3
0 votes
0 answers
24 views

Sequelize Many to Many relation with an unique field

I have role and permission model. They have a many to many relation, but permission model´s primary key is composed by two fields, also, permission model has id field that is just unique and not a key....
Jaime Alonso Parra Lozada's user avatar
0 votes
1 answer
40 views

Mysql2 messing with routing

I am trying to use mysql2 in the backend but it seems to messing with my routes when I use it in production. My server file looks like this: const express = require('express') const app = express() ...
Adam's user avatar
  • 13
1 vote
1 answer
60 views

Is there a way to select a row of a table with a specific column value that also displays its row number from the in original table in phpmyadmin? [duplicate]

I am trying to make a full-stack CRUD web app using mysql through phpmyadmin, which will be sent to an express front end (this is my first time ever working with SQL and PHP so pardon my mistakes or ...
Alex Peng's user avatar
2 votes
2 answers
55 views

Is there a way to set a column in mysql that will automatically be the value of the row's row number?

I'm very new to creating my own projects and SQL in general and I'm having issues with having a "rank" column that will generate the ranking of a specific row of data based on the "time&...
Alex Peng's user avatar
0 votes
0 answers
55 views

EntityMetadataNotFoundError: No metadata for "User" was found

i have a nestjs project that i've published it with github actions and then i want to use the service of it in my other project for example (registerUser). but i am getting this error: ...
Itadori's user avatar
0 votes
0 answers
31 views

error while export data to csv from mysql in nodejs

i want to export data to excel from mysql using nodejs currently i have 5M+ records in database and throw error kill but when i have around 1.7M records at that time this is working so i think i need ...
Jay Limbasiya's user avatar
0 votes
1 answer
93 views

javascript - heap out of memory

i have api in nodejs for read data from mysql database and write it into csv file and download file after complete write in csv file. when i have 1.7 million records in database it is working but now ...
LJ CREATION's user avatar

15 30 50 per page
1
2 3 4 5
144