Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey
Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

I am building a RAG application using Node.js, Sequelize, and PostgreSQL with the pgvector extension. I have successfully enabled the vector extension in my database. I am now trying to create a ...
Mohammed Hassan's user avatar
1 vote
2 answers
106 views

I'm facing an issue with Sequelize(postgres) transactions in a high-traffic Node.js/Express app. I have a flow like this: async function createPayment(data, trnx) { // Save in DB within transaction ...
Tahseen Rasheed's user avatar
3 votes
1 answer
101 views

So, I'm trying to learn full stack by making a list app, and I'm using Sequelize.js for the database. So far I've got User and List models. I recently switched to Sequelize v7.0.0-alpha.47. I can't ...
MaxCodes's user avatar
  • 112
1 vote
0 answers
60 views

I am use Sequelize with Postgree in a Serveless project. I just try to get an array of +600 objects from API and I need to send to DB. I use a map() for that array and I use sequelize upsert() or ...
Bryan's user avatar
  • 11
0 votes
0 answers
41 views

I´m trying to establish a follow list to from user to user: class Follower extends Model<InferAttributes<Follower>, InferCreationAttributes<Follower>> { @Attribute(DataTypes.UUID) ...
Kirillos coding's user avatar
0 votes
2 answers
52 views

I'm trying to integrate sequelize with the db conection to postgres and i am getting an error where relationships are built. i don't know if i'm missing something at this point index.js 'use strict'; ...
o.go's user avatar
  • 1
0 votes
0 answers
42 views

i am trying to migrate the dataset in mysql database being the role_id and module_id same mysql is refusing to store saying sqlMessage: "Duplicate entry '3-1' for key 'role_module_bridge....
Abijeet Raut's user avatar
0 votes
0 answers
46 views

I want to update multiple records ( more than 100 ) and for this I am trying to use bulkCreate method of sequelize with following parameters: const updatedUsers = await User.bulkCreate(allUserInfo, { ...
JayantSeth's user avatar
1 vote
0 answers
29 views

My sequelize-cli is npx sequelize-cli model:generate --name Profile --attributes username:string,imageUrl:string,fullname:string,dateOfBirth:date,UserId:UUID,role:enum:'{staff,admin}':defaultValue:...
flyingduck92's user avatar
  • 1,692
0 votes
0 answers
56 views

In Sequelize, I've the following schema: const User = sequelize.define('User', { name: DataTypes.STRING, email: DataTypes.STRING, }) But in TS, User ends up being typed as ModelCtor<Model<...
Joy's user avatar
  • 103
0 votes
0 answers
27 views

I have a Sequelize model that has a property that is also a model. In this case, Category has a property ParentCategory that is an optional model of Category. When I get the "non model" ...
CmdrShepardsPie's user avatar
0 votes
0 answers
14 views

I have a frontend web project A with dependencies B, the dependencies B using sequelize that only work in node with server side. So I tried to exlclude sequelize https://sequelize.org/ in project A ...
Dolphin's user avatar
  • 40.8k
1 vote
1 answer
194 views

I've been trying to set-up a working Electron application using Electron Forge with Sqlite3 and Sequelize. This has worked great up until where I need to actually build and package, and distribute the ...
Scott Mckay's user avatar
-3 votes
1 answer
100 views

I maintain a Node.js (v14.x) + Express + Sequelize (v6.x) application and use Snyk Code to catch security issues in our CI pipeline. We rely heavily on Sequelize’s parameter binding (:param) to ...
Raymond M. Roberts's user avatar
1 vote
1 answer
79 views

I'm using the sequelize-cursor-pagination package to implement pagination in my Node-Postgres application. I need to order my results based on a field from an included (associated) model, but the ...
droid's user avatar
  • 78
-1 votes
1 answer
66 views

I have been scratching my head for a while now trying to figure out how to exclude unnecessary database dialect adapters. For context, I am building an app with Vite. Its using ElectronJs and ...
Sukanta's user avatar
  • 103
0 votes
1 answer
47 views

I'm making a query to Articles table to get the article data with publisher, tags, images and categories. The relation between publisher and article is M:1, between tags and articles N:M, between ...
Osama Assi's user avatar
0 votes
1 answer
36 views

I am creating a node API connecting to a mySql db using Sequelize. I want users of the API to be able to specify which models to include in the results of a query. For example I have a model like this:...
Brian's user avatar
  • 1,547
0 votes
0 answers
43 views

In sequelize documentation, it is stated in association alias section Aliases are especially useful when you need to define two different associations between the same models. For example, if we have ...
polar's user avatar
  • 1
1 vote
0 answers
71 views

I'm having issues running RDS sequelize queries. I'm using EC2 Node.js original: error: no pg_hba.conf entry for host "172.31.8.1", user "postgres", database NAME, no encryption 5|...
Yuki Chan's user avatar
1 vote
0 answers
39 views

I'm learning sequelize + other stuff and I'm using sequelize-cli to initialize the sequelize and generate the models. When I try to use the model in other file it doesn't suggest anything related to ...
Hid's user avatar
  • 19
1 vote
1 answer
109 views

I'm in the process of migrating a Javascript project to Typescript. One of the steps is to migrate the sequelize models. I'm following the instructions located at: https://sequelize.org/docs/v6/other-...
lordoku's user avatar
  • 1,262
0 votes
0 answers
28 views

I would like to know how to correctly use useMaster with graphql-sequelize. I'm trying to force the query to go to the master database using this code: before: (findOptions) => { const ...
Anderson Vendruscolo's user avatar
1 vote
1 answer
41 views

Sequelize's createXXXXX method doesn't seem to be adding the necessary foreign key. This running the following code for these two models gives me a "notNull Violation: Seat.office_id cannot be ...
hobberwickey's user avatar
  • 6,464
0 votes
1 answer
54 views

I don't want to eagerly load all the associated data, it won't be used. But, I might want to know that related records exist, for example to link to related records. So I'm trying to set up an ...
Randy Hall's user avatar
  • 8,337
0 votes
0 answers
36 views

Here is the full code: const StockTypes = require('./stock_types'); module.exports = (sequelize, DataTypes) => { const Stock = sequelize.define('Stock', { name: { type: DataTypes....
Serkan's user avatar
  • 81
0 votes
0 answers
33 views

Trying to establish a connection to my local PostgreSQL database via Sequelize. I have no trouble accessing it with pgAdmin, using postgres as the user and no password. I am passing this into the ...
Randy Hall's user avatar
  • 8,337
2 votes
1 answer
213 views

I’m currently working on a project where we are using PostgreSQL with Sequelize to perform complex queries involving multiple nested include relationships. However, we’ve encountered an issue related ...
Dip Patel's user avatar
0 votes
0 answers
34 views

await sequelize.sync({ alter: false, force: false }); My expectation and also as per the sequelize documentation this will only create the new tables if not present, it will not run any alter query. ...
Shubham Singh's user avatar
1 vote
1 answer
49 views

I have 2 rows in the database table moneys. Using Sequelize, I want to select all rows from the table. The following raw query in DBeaver MySQL client returns all the results. So, that works as it ...
kkamara's user avatar
  • 41
0 votes
0 answers
112 views

Product Model import { DataTypes } from "sequelize"; import sequelize from "../util/database.js"; const Product = sequelize.define("product", { id: { type: ...
Sezer Emer's user avatar
0 votes
0 answers
53 views

When querying Postgres, field names are case-insensitive: select id from contact; and select Id from contact; will both work. But, when using sequelize (v6), the attribute in my model definition must ...
a_stout_man's user avatar
0 votes
1 answer
73 views

I'm using type module/import syntax for the rest of my project, but the Sequelize CLI generates files with require syntax. How should I handle this? I'm already having trouble with not being able to ...
t t's user avatar
  • 1
0 votes
1 answer
220 views

I've been using Sequelize (6.37.X) on a small side-project for a while. Just a day or so ago, I started having failures in my unit tests, and I'm seeing a lot of this warning on the console: (...
rjray's user avatar
  • 6,951
0 votes
0 answers
60 views

I'm using Sequelize v6.37.5 with PostgreSQL in a multi-tenant architecture, where each tenant has its own schema. Models are defined once globally, and we use .schema(schemaName) to access tenant-...
DIGVIJAY SINH CHAUHAN's user avatar
0 votes
0 answers
47 views

I make an association BelongsToMany, Chapter as many Chapter with sequelize V7 But when I create a Association Adder I have an error: TypeError: chapter.addChapter is not a function This is my model ...
Huyenlong's user avatar
1 vote
1 answer
91 views

I'm working on a Node.js backend project and have run into a strange issue involving MySQL connections. Here's the situation: I am using a MySQL database hosted on Digital Ocean (Managed MySQL ...
Rawand ofj's user avatar
0 votes
0 answers
28 views

Relevant packages: "sequelize": "^6.37.6" "sequelize-typescript": "^2.1.6" I am using sequelize and typescript in a project. I am receiving an error when ...
Zayum's user avatar
  • 139
0 votes
1 answer
69 views

So I'm trying to create a user for my task management app, I'm using Express.js, Sequelize ORM for PostGres and Apollo/Server for graphql. Creating a user works fine, but when I try to login using ...
Edens Fallen Leaf's user avatar
0 votes
0 answers
24 views

I am trying to have the sequelize function findOrCreate in combo with axios. I have a couple of routes setup like: router.get("/byId/:id", async (req, res) => { const id = req.params....
udarts's user avatar
  • 886
0 votes
0 answers
39 views

Consider the following models and the following post method: router.post("/", async (req, res, next) => { const { address: addressData, building: buildingData, items: ...
IgorArnaut's user avatar
0 votes
0 answers
40 views

When I cache multiple Sequelize instances while sharing the same models (entities), the last cached instance in memory overrides the Sequelize instance of the models from the previous cache. for ...
Anandhu Suresh's user avatar
0 votes
0 answers
13 views

I use sequelize-cli migration scripts to create models I have created models 'user' and 'user-role' I want to access to model user_role from the file user This how my directory structure looks like: [...
Дмитрий Касминюк's user avatar
1 vote
1 answer
52 views

I have a Vue 3 app hosted on Netlify, and the backend is hosted on Heroku. The login is a simple /login endpoint made with Express and Sequelize. It works well on desktop, but when I try to log in on ...
Luis's user avatar
  • 9
0 votes
0 answers
34 views

I'm getting a Type error when trying to sync a model with @sequelize/snowflake ( "@sequelize/core": "^7.0.0-alpha.42", "@sequelize/snowflake": "^7.0.0-alpha.45")...
Sabine Vidal's user avatar
0 votes
0 answers
34 views

When adding a sequelize-typescript's decorator to the model field, which should check that the field is not empty, validation does not work and allows you to create a record without passing this field....
Yan Dobrovolskiy's user avatar
0 votes
2 answers
42 views

I try count foreign table rows with Sequelize this.publicationModel.findAll({ attributes: { include: [ [Sequelize.cast(Sequelize.fn('COUNT', 'comments.id'), 'int' ), '...
Алексей Смирнов's user avatar
0 votes
1 answer
80 views

I have a table named Expenses and the table has a column named expenseEditHistory. The column is of JSONB type. I am using sequelize to manage the database (postgres). Structure for expenseEditHistory ...
SaaD Ibne Jamal's user avatar
0 votes
2 answers
172 views

I'm learning Nest.js, I'm trying to connect via SequelizeModule to my local postgres database, but I keep getting this error Error when starting start:dev [20:41:14] Starting compilation in watch mode....
ralph's user avatar
  • 3
0 votes
1 answer
59 views

I’m working on a Node.js project using Sequelize with MySQL. The database connection is established successfully, and sequelize.sync({ alter: true }) runs without errors, but my users table is not ...
Marcocholla01's user avatar

1
2 3 4 5
249