Questions tagged [feathers-sequelize]
81 questions
2
votes
1 answer
How do I create many-many association in feathers-sequelize?
I have a feathers api set up using feathers-sequelize to persist to a MySQL database.
I've got the datamodel set up and can see the relevant tables are created.
const Sequelize = require('sequelize');
module.exports = function (app) {
const…

alt
- 2,356
- 2
- 21
- 28
1
vote
1 answer
Error "Invalid query parameter $dis " from feathersjs (nodejs framework)
I am facing an invalid query parameter error from feathersjs back end . i am using react as front end. My request is .
I did not write this code initially. the $includeEc was already there, but that does not create an error. I know $include, $limit…

TylerKenFleck
- 11
- 3
1
vote
0 answers
Is there a way to sort by association property? something like /posts?$shallow=false&$sort[user.email]=1
I have 2 models user and post with one-to-many relationship. I'm using feathers js and feathers-sequelize. The response I get when I query post is something like this:
[
{
"id": 1,
"title": "Random title",
"userId": 3,
"user": {
…

desmond
- 65
- 1
- 7
1
vote
1 answer
FeathersJs - Sanitize response from Find method in users service broke Authentication service
I created an after hook in the users service that should sanitize the response from the "find" method and it broke the authentication service.
The after hook sanitizeResponse should verify if the query is regarding the email or cpf, and, if it is,…

Rodrigo Ramalho
- 35
- 4
1
vote
0 answers
FeathersJs: Check if user is item creator or creator of associated item
I have two services: posts and comments. Every post can have multiple comments. User 1 creates a post, user 2 creates a comment inside this post. Both users should be able to update, patch or delete the created comment. How do I correctly qualify…

macroloft
- 105
- 1
- 8
1
vote
1 answer
Feathers: Customizing find() for two different queries
I'm using FeathersJS and ReactJs to build an application and now I am stuck in a certain point.
The user interface I'm working on is a table and I have a navigation bar to control the data exhibited, like in the image.
In the select users may…

Ed de Almeida
- 3,675
- 4
- 25
- 57
1
vote
2 answers
How to run migrations in a feathersjs typescript project?
I'm wondering how to run Sequelize migrations on a typescript feathersjs project generated by feathers-plus CLI.
The guide at https://github.com/feathersjs-ecosystem/feathers-sequelize is only concerned with JS project. TS project where sequelize…

jiroch
- 414
- 6
- 19
1
vote
2 answers
difficulty connecting to SQL Server database inside a docker container using Sequelize
I have an SQL Server Docker image called microsoft/mssql-server-linux which was used to spin up an SQL Server database. I have an API which I made outside of Docker and I've unsuccessfully tried to construct a connection string to connect to this…

Jeff Hernandez
- 355
- 4
- 13
1
vote
0 answers
Feathersjs, feathersjs-vuex clean npm install giving issue
I am setting up a new web app with feathersjs as the back end and Vue + feathers client (feathers-vuex) as my front end. However, after installing the packages using npm, I am getting multiple import errors as follows -
Could not find a declaration…

ChelAdm
- 41
- 3
1
vote
0 answers
Feathersjs frontend and backend in a single project
I'm looking to build a small customer management portal for myself. I've recently started working with node and vuejs a lot (coming from an html/css/javascript background). I've really enjoyed CLI development though and am looking to build a…

ItsPronounced
- 5,475
- 13
- 47
- 86
1
vote
1 answer
Feathers-Sequelize with Postgres: How to query an Array
I want to see if an array contains one or more values inside it.
This is a model field definition:
keywords: {
type: Sequelize.ARRAY(Sequelize.STRING),
defaultValue: [],
allowNull: false,
…

eGlu
- 697
- 11
- 22
1
vote
2 answers
How can I default the value of a column to be the same of another column in model with Sequelize?
I have a simple model, with an _id column as expected, but there is a secondary id which I would like to default to the same value of the _id column. This is currently what the model looks like:
const sequelize =…

theJuls
- 6,788
- 14
- 73
- 160
1
vote
1 answer
feathers.js - saving one record to multiple databases - mysql and elastic search
I have built an app with Feathers.js and I'm trying to find the way, how can I save any record to the multiple databases? I would like to save a "message" for example to the mysql and also to the elastic search.
I would like to use elastic search…

FLEXROAD
- 43
- 5
1
vote
1 answer
Feathers-Sequelize Where statement and Query param
I have the following feathers-sequelize query:
context.params.sequelize = {
raw: false,
include: [{
model: organisations,
where: organisationId ? { id: organisationId } : undefined,
include: [{
model: roles,
…

eGlu
- 697
- 11
- 22
1
vote
1 answer
Node Feathers Sequelize API invalid column name
I am setting up an API to a SQL Server 2008 database using Node, Feathers and Sequelize. I have successfully created the models and services using feathers-sequelize-auto, and most of the routes seem to be working. The app runs but with an error…

Kate
- 35
- 1
- 11