Questions tagged [loopback4]

Questions about LoopBack version 4. Use this tag for LoopBack questions which are specific to only version 4. General LoopBack questions should be tagged with loopbackjs.

Create powerful APIs easily with a new creation experience for defining REST APIs and handling API requests/responses.

A new, improved programming model with dependency injection and new concepts such as components, mixins, repositories, etc. make this the most extensible version yet.

See also

483 questions
0
votes
1 answer

Any method in loopback 4 repository to update specified attributes of a record

I want to update the user name, address, contact# of a certain user without updating the password and other attributes of a object/record.
Ch Asjad
  • 1
  • 2
0
votes
1 answer

passport integration with loopback 4?

I've seen the lb3 article on integrating passport (https://loopback.io/doc/en/lb3/Third-party-login-using-Passport.html). I don't see anything similar for lb4. Is the article for lb3/passport still valid for lb4? If not, thoughts on integrating…
MJF
  • 83
  • 9
0
votes
2 answers

How to use include filter on loopback 4 find method

I'm developing a account management system using loopback4 I have defined following relationships on my models properly. Owner hasMany Transaction Transaction belongsTo owner Transaction belongsTo Bank I want to find all transactions belongs to…
Salitha
  • 1,022
  • 1
  • 12
  • 32
0
votes
1 answer

Set Up Many to Many relations in Loopback 4

I'm setting up many to many relations in my loopback 4 application. Currently I am using this answer as a guide but after the repository and controller creation I don't know how to continue. Currently I have three tables for the relation: Course,…
0
votes
1 answer

How to use MongoDB extended operators in Loopback 4?

I'm working with loopback v4 and I need to use the MongoDB $unset extended operator. Documentation on MongoDB connector indirectly states that it can be used (see here) , but I can't find any example/documentation on how is it supposed to be used on…
sertal70
  • 493
  • 3
  • 10
0
votes
1 answer

Typescript return type Interface has additional fields

I want to get data from database and return it as defined in interface (ie only values matching interface). i wrote following codes // get data from databae - db.find() async getCustomerList(): Promise { const…
Salitha
  • 1,022
  • 1
  • 12
  • 32
0
votes
1 answer

Fail to assign free-form object Entity model with strict to false

I have a function call ordersConfirmation with an argument Orders[]. It works when passing the list of array from repository. According to Entity setting, I thought there is no restriction with setting strict: false. However, I got error when I was…
Roy Pun
  • 493
  • 4
  • 8
0
votes
1 answer

Need some advice about a structure problem

Me and my team will develop some applications that will communicate with other, this application will work basically like this: A front-end application built with react that communicates with an API. The way that this API will work is: each one of…
Hudison
  • 3
  • 4
0
votes
2 answers

Loopback change repositories datasource for testing

I want to test the loopback endpoints with mocha, like this example that comes with loopback This example, but when I instantiate the main class I am using the datasource that was injected in each repository, but just for testing with mocha I want…
Gabriel-BS
  • 11
  • 1
0
votes
1 answer

Pass custom parameters in interceptor with provider

I created an interceptor with provider and bound it to "rpc" export class RPCProvider implements Provider { constructor( @inject(CertifierBindings.CERTIFIER) public certifierModule: CertifierModule ) { } …
Zhikai Xiong
  • 357
  • 2
  • 9
0
votes
1 answer

Using hasMany relation and cascading ORM level in loopback4

I have created 2 models Author and Books where Author has hasMany relation with Book and Book has belongsTo relation with author. While saving data using ORM models the cascading is not happening i.e { "authorId": 1, "name": "qwery", …
sunilsmith
  • 111
  • 2
  • 15
0
votes
1 answer

Proper way to call a MYSQL stored procedure using Loopback4

I'm trying to use Loopback 4 (https://loopback.io), what is the proper way to call a stored procedure and get the returned results? Do I create a repository or model (for the returned data)? Or should I do everything inside the controller?
0
votes
1 answer

Save data with relation (Nodejs / loopback 4 / mongoDB)

I can not post data json with relation object. I use mongoDB. I have 3 table: table_1, table_2, table_3. I create relation EmbedsMany and EmbedsOne: - table_2 EmbedsOne table_1. - table_2 EmbedsMany table_3. I don't know create post data json to…
Huan Ho
  • 145
  • 2
  • 9
0
votes
1 answer

How to stream file as download on Loopback 4?

I'm trying to create a system that would read a file from another site and serve this as a file download to the user. The file size could vary from Mbs to Gbs. I have have already created a proof of concept using vanilla nodejs. const app =…
ProNoob
  • 83
  • 1
  • 10
0
votes
2 answers

TypeScript: extend objects in array with asynchronous loaded data

I want to extend an response in a loopback4 controller method (TypeScript). I already have an array of objects loaded from database, but each of these objects has to be extended by additional asynchronously loaded data. How do I have to build the…
MIB
  • 337
  • 2
  • 15