sequelize-typescript Questions
3
While using the sequelize-typescript npm
When trying to invoke the Street.create(obj) I get an error:
Argument of type 'plainObject' is not assignable to parameter of type
'Optional<Street, Nul...
Embezzle asked 6/11, 2022 at 14:24
2
I'm trying to instanciate one sequelize per Database. Some tables in DB1 has relationships with tables in DB2, and reverse. One of the relationships is DB1.Utilisateur.contenuProvenance_id => DB2.C...
Devest asked 6/2, 2020 at 7:54
2
I am trying to run some db migrations but i keep getting the below error:
DatabaseError [SequelizeDatabaseError]: type "public.enum_companies_accountingSwStatus" does not exist
I have don...
Endoenzyme asked 17/6, 2021 at 8:22
2
Solved
I'm defining one to many relationship between a User and a Product in sequelize-typescript.
Here are the Models:
Product.ts
@Table
export class Product extends Model {
@Column({ primaryKey: true }...
Pyroligneous asked 30/6, 2021 at 14:47
2
Solved
On Sequelize v5 When I configuring the associations between models I got error like this.
/home/aditya/project/apisrv/node_modules/sequelize/lib/associations/base.js:106
throw new AssociationErro...
Perlman asked 30/8, 2019 at 7:39
2
I have 1:n association Company -> CompanySettings,
what I want is, I find Company by Id then create companySettings by that instance and automatically fill the foreign key attribute
using sequel...
Laity asked 26/10, 2019 at 16:20
3
Solved
I'm trying to create a base crud service that takes a Sequelize model and creates all basic APIs for it so what I have done it this:
export class RepositoryService<T extends Model<T>> ...
Johnniejohnny asked 14/3, 2019 at 15:23
1
Solved
I am fairly new to typescript and have scoured the web trying to find an explanation for this.
Recently I have been working on a project and have wanting to use sequelize with it. When reading thro...
Paunch asked 28/4, 2021 at 14:24
1
Solved
I am trying to connect to a Postgres database from typescript. I'm using sequelize-typescript as an ORM. My problem is that the script gets stuck on await sequelize.sync();. Here's the sequelize.ts...
Shyamal asked 1/11, 2020 at 16:48
0
I have many to many relationship between Properties and Currency model and the join property_currency model for junction table as follows. Migration files are written accordingly and database table...
Hormonal asked 28/5, 2020 at 7:53
0
I want to store a simple JSON-Array in a MariaDB using sequelize-typescript. Here's a basic Model that would work in PostgreSQL, SQLite and MySQL.
class MyModel extends Model<MyModel> {
@Col...
Hydrogenous asked 10/12, 2019 at 22:55
2
Author.ts
import {Table, Model, Column, DataType} from 'sequelize-typescript'
@Table
export class Author extends Model<Author> {
constructor(){
super();
}
@Column(DataType.STRING)
fname:...
Fieldfare asked 5/1, 2018 at 2:40
1
Solved
Controller and method for testing:
import { Controller, Get, Response, HttpStatus, Param, Body, Post, Request, Patch, Delete, Res } from '@nestjs/common';
@Controller('api/parts')
export class Par...
Williamson asked 27/9, 2019 at 13:55
1
© 2022 - 2024 — McMap. All rights reserved.