Questions tagged [feathers-sequelize]

81 questions
22
votes
3 answers

Sequelize js , how do we change column type in migration

how do we change column type in migration. In my migration 1 I have a migration that added the column. Now I want to change the column type from string to text , should I create a new migration file which is like changeColumn or I can create new…
user13829188
7
votes
3 answers

Feathers.js / Sequelize -> Service with relations between two models

I've got feathers.js functioning with mysql via sequelize. This is working, I can collect data from tables. Next step is to define 'joins' in the models. I have a table with a column 'status_id' and 'country_id'. These columns reference to an id in…
6
votes
1 answer

FeathersJS seems to limit queries to 1000 even if you set $limit to above 1000

I've been using feathers a lot and love it, but I need to return over 1000 records for a special case. However, no matter what I do, Feathers returns a query resetting $limit to 1000, and only returns 1000 records. I know it's getting my $limit…
Nick Steele
  • 7,419
  • 4
  • 36
  • 33
5
votes
2 answers

How to query many to many relation in sequelize

I've been using feathersjs/nodejs over postgres db via sequelize. In my db i have Users table and Events table. They are twice in relation: events.belongsTo(models.users, { foreignKey: { name: 'creatorId', allowNull: false }, …
Kerim092
  • 1,367
  • 1
  • 12
  • 32
4
votes
1 answer

Feathers JS - Create multi entries - dumb question

following the documentation I realize there's an option to allow bulk creation, but I don't understand where and how to set the option, here the code: // Initializes the `test` service on path `/test` const createService =…
Arc009
  • 43
  • 4
4
votes
1 answer

Feathers-Sequelize: hasMany returns only first result, flattened

I tried feathers-sequelize today for the first time and am now struggling for a couple hours already on hasMany asociations. I want to do a simple projects (>hasMany>) issues relationship, but I'm just getting the first issue. Desired output: { …
MrSnoozles
  • 860
  • 8
  • 13
4
votes
0 answers

Issue with duplicate sort id on primary key Sequelize & Feathersjs

OK , so I managed to get the default sort order going using this (thank you ) : How Can I set the default Sort order in FeathersJs this is pulling data from mssql I added in an include in the hook to get related…
Martin Thompson
  • 3,415
  • 10
  • 38
  • 62
4
votes
1 answer

How to check associations feathers-sequelize in service hook

I`am using feathersjs. I have read the documentation. How do I execute this method to check on the service hook feathers-hook, or tell me another method of check. const { disallow } = require('feathers-hooks-common'); function include() { return…
3
votes
2 answers

Sequelize hasMany association returns only a single object

The hasMany association should return a list of object, rights? I have a user record and a few connections records connected to it. model connections: userId: { field: 'user_id', type: DataTypes.STRING, allowNull: false …
Milkncookiez
  • 6,817
  • 10
  • 57
  • 96
3
votes
0 answers

Feathers-vuex how to send Op.like keyword in query to feathers-sequelize backend

I am using feathers-vuex and vue.js for the frontend and feathers.js with MySql db at the backend. I want to execute a search function on the front end which sends a query to the backend with the Op.like function. The backend however, does not…
ChelAdm
  • 41
  • 3
3
votes
0 answers

Ordering query with feathers-sequelize

I am trying to write a hook which adds ordering to a query on a table with associations. My query is on 'points' which has a join-table 'point_photos' and then is associated m:n to 'photos'. The standard feathersjs $sort can not be used for…
musicformellons
  • 12,283
  • 4
  • 51
  • 86
2
votes
1 answer

Strange error when initializing Postgres database in FeathersJS

I am converting a FeathersJS system from MySQL to Postgres and facing some problems. After changing the connection string "mysql": "mysql://user:password@server:port/database" to "postgres": "postgres://user:password@server:port/database" at…
Ed de Almeida
  • 3,675
  • 4
  • 25
  • 57
2
votes
1 answer

Does Sequelize open a new connection to the database for each query execution

I'm using nodejs and SequelizeJS to my sql database. After I verify the connection, sequelize .authenticate() .then(() => { console.log('Connection has been established successfully.'); }) .catch(err => { console.error('Unable to…
raxinaga
  • 411
  • 1
  • 6
  • 18
2
votes
1 answer

Using feathers-client and sequelize many-to-many relation

I'm trying to get data from an n:m association using feathers. I'm using react for my front-end and connecting to feathers using the feathers-client and socketio. //connection string where the feathers api is running const host =…
theVortr3x
  • 70
  • 10
2
votes
0 answers

How to add / update / remove relation in feathers sequelize

I try to use feathers to create a blog with Post and Tag (Many to Many relationship). If I create Post and Tag separate and add / update / remove relations. What should I do? Here is my github repo https://github.com/kieusonlam/blogapi
Lam Kieu
  • 75
  • 1
  • 6
1
2 3 4 5 6