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
0 answers

parsing issue with loopback 4?

I am using webhook in my project. So webhook hit an endpoint that i created. When i used node js i used a body-parser. So it gives req.body as "events":[],"firstEventSequence": 0,"lastEventSequence": 0, "entropy": "INYZZZJXMEHHCOCQNKWN"} As here…
TechChain
  • 8,404
  • 29
  • 103
  • 228
0
votes
2 answers

enforcing uniqueness in loopback4 model's properties

I started to run a simple hello world project using lb4. I created a basic mongodb datasource, and a repository and a simple model (username, password and id) for users with cli command provided by loopback. I also created a user controller, with a…
Ali Bahrami
  • 910
  • 9
  • 21
0
votes
1 answer

two objects and array foreach put the values from old object to new object in typescript

I have two object and a arrar var collection = [ { _id: 'recommend', count: 3 }, { _id: 'enjoy', count: 1 }, { _id: 'contribute', count: 1 } ] var collection1 = [ { _id: 'ZWx0aWVtcG86MTIzNDU6ZXNwYW5nbGlz', websiteId:…
jonathan
  • 114
  • 9
0
votes
1 answer

LoopBack 4: Adding type attribute to an element in a SOAP request

I'm using LoopBack 4 to access a third party SOAP API and am having difficulty getting a specific SOAP call to work. The documentation doesn't appear to cover this scenario. Relevant parts of WSDL:
Pilot_51
  • 7,337
  • 3
  • 29
  • 26
0
votes
1 answer

How to use Scope/Relation in loopback4

I am working on a social app where I am having a PostComments model whos relation established with User model (comment_by). PostComments Model import { Entity, model, property, belongsTo} from '@loopback/repository'; import {Users} from…
0
votes
1 answer

LOOPBACK4 npm run docker:start ERROR '.' is not recognized as an internal or external command

I'm doing the try it out section in loopback4 oficial site: https://loopback.io/doc/en/lb4/Authentication-Tutorial.html But when i try to execute the next command: npm run docker:start I get the following…
0
votes
1 answer

Implement multiple REST servers on same Loopback 4 app

Can we create multiple REST servers in single loopback app? My requirement is running two REST servers (say 8080 and 8081 on localhost) but to have same app. My implementation will be, receiving some data from 8080, process them and return some…
Salitha
  • 1,022
  • 1
  • 12
  • 32
0
votes
1 answer

Hasher generating different hashes for same password in loopback?

I am using loopback hasher as import { PasswordHasher } from './hash.password.bcryptjs'; This has a function generate hash credentials.password = await this.passwordHasher.hashPassword(credentials.password); I am giving input as pass@1010 for…
TechChain
  • 8,404
  • 29
  • 103
  • 228
0
votes
1 answer

Can I have camel case as default when using postgres in loopback?

If you don't specify anything all the fields are created as lower case in the database when using postgres. Is it possible to change the default behavior to use the exact name of the fields in the model? That makes it easier to write custom…
Tomas Jansson
  • 22,767
  • 13
  • 83
  • 137
0
votes
1 answer

How to enforce unique column with unique value postgresql

Is it possible to enforce unique value coupled with a unique column in postgres? I am using v. 11. It would be something like this: status = 0 | store = 5 unique(store, status = 0) That way, I can have any value for store, but for each value, it can…
Vikram Khemlani
  • 555
  • 6
  • 17
0
votes
1 answer

Dependencies are incompatible with updated loopback-cli version

I have just Updated @loopback/cli version from 1.21.4 to 1.24.0. But now some dependencies are incompatible with the updated loopback version. For every command with lb4, it is giving the following error The project was originally generated by…
pratik jaiswal
  • 1,855
  • 9
  • 27
  • 59
0
votes
1 answer

How to add include filter in loopback 4

I have three models product, purchase, and stocks. The product mode has hasmany relation with purchase and stock. Now I want to collect data from all three models. Recently Loopback team added inclusion resolvers for has many relations…
pratik jaiswal
  • 1,855
  • 9
  • 27
  • 59
0
votes
1 answer

Loopback 4 hasMany with composite foreign key (postgres)

To keep it simple I have a Customer 1 -- * Orders Create table customers ( customer_id int, offset_id int, name text, CONSTRAINT pk_customer_id PRIMARY KEY ( customer_id, offset_id )) Create table orders ( id int, offset_id int, name…
Kevin Hussey
  • 1,582
  • 1
  • 10
  • 17
0
votes
1 answer

How to create loopback 4 model, repository and controller without specifying an ID

My model has a Composite Primary Key, composed by 3 columns. When I try to create everything using commands: lb4 model lb4 repository lb4 controller I can't find the way to specify those three camps combined are the PK, or to simply don't specify…
0
votes
1 answer

Command line interface (CLI) not working after mounting lb3 to lb4 as documented

I mounted lb3 into lb4 app as documented but now i can not use lb cli and getting the following error: "Warning: Found no data sources to attach model. There will be no data-access methods available until datasources are attached.". It's because the…
Omtechguy
  • 3,321
  • 7
  • 37
  • 71