Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 31 16:43
    uniconstructor edited #4126
  • Jan 31 16:41
    uniconstructor edited #4126
  • Jan 31 16:41
    uniconstructor opened #4126
  • Jan 31 03:44
    dzungh0ang closed #4123
  • Jan 30 00:25
    techaks closed #4125
  • Jan 30 00:02
    techaks edited #4125
  • Jan 30 00:01
    techaks opened #4125
  • Jan 29 23:33
    jkpulido opened #4124
  • Jan 29 13:32
    nabdelgadir closed #4114
  • Jan 29 09:17

    bajtos on add-node10


  • Jan 29 07:13
    dzungh0ang opened #4123
  • Jan 29 04:25
    dhmlau closed #3881
  • Jan 28 13:14
    bajtos edited #4119
  • Jan 28 12:47
    bajtos labeled #4121
  • Jan 28 12:46
    bajtos labeled #4118
  • Jan 28 12:46
    bajtos labeled #4118
  • Jan 28 12:46
    bajtos labeled #4118
  • Jan 28 12:46
    bajtos assigned #4118
  • Jan 25 19:50
    dhmlau closed #3906
  • Jan 25 19:13
    mschnee synchronize #4119
"error": {
"statusCode": 422,
"name": "UnprocessableEntityError",
"message": "The request body is invalid. See error object details property for more info.",
"details": [
"path": "",
"code": "not",
"message": "should NOT be valid",
"info": {}
with memory DB there is no issue but when adding MongoDB post API is making issue as I post above.
Warman Suganda
hi, how to defining custom keywords? i need add AJV keyword for Asynchronous validation in some controllers.
Ahmad Ali
hello any example how to make live location in lp4 ?
where is strong-pm workspace?
Eduardo Mazzucchelli

hi people, do you know about this error ???

"name": "wellnotes",
"options": {
"idInjection": false,
"mssql": {
"schema": "dbo",
"table": "wellNotes"
"properties": {
"id": {
"type": "Number",
"required": true,
"length": null,
"precision": 10,
"scale": 0,
"id": 1,
"mssql": {

"error": {
"statusCode": 404,
"name": "Error",
"message": "Unknown \"wellnotes\" id \"undefined\".",
"status": 404,
"code": "MODEL_NOT_FOUND",
"stack": "Error: Unknown \"wellnotes\" id \"undefined\".\n at new Error (native)\n at Function.convertNullToNotFoundError

Hi all, I'm working with lb4 and I need to use the MongoDB $unsetextended operator. Documentation on MongoDB connector indirectly states that they can be used (see here) , but I can't find any example on how should I use them on my repository, do you have any hints?
Eduardo Mazzucchelli

hi people, how are you ?

what can be, the relations propoeties works with BelongsTo, but not with hasMany

"relations": {
"cat": {
"type": "hasMany",
"model": "wnCategories",
"foreignKey": "idCategory",
"primaryKey": "id"
"ss": {
"type": "hasMany",
"model": "wnStatusSituations",
"foreignKey": "idSituationStatus",
"primaryKey": "id"

with hasMany, says:
"originalError": {
"info": {
"number": 207,
"state": 1,
"class": 16,
"message": "Invalid column name 'idCategory'.",
"serverName": "sqlaas01d-e1-sinopecarg",
"procName": "",
"lineNumber": 1,
"name": "ERROR",
"event": "errorMessage"

the category, exists.

"idCategory": {
"type": "Number",
"required": true,
"length": null,
"precision": 10,
"scale": 0,
"mssql": {
"columnName": "idCategory",
"dataType": "int",
"dataLength": null,
"dataPrecision": 10,
"dataScale": 0,
"nullable": "NO"

Asjad ® 🤷🏻‍♂️
Hi , usually when you create model it maps exactly in the postgresql. but when i use relations in lb4 i.e @hasmany etc it has no effect on postgresql database sql. Even when i create arrays in lb4 as proposed in the docs no changes happen in the sql when i see it in pgadmin.
secondly is their any way you can use sql complex queries like( group by queries ) to work in lb4
William Ondenge
{ "cardAcceptor": { "address": { "city": "Foster City", "country": "RU", "county": "San Mateo", "state": "CA", "zipCode": "94404" }, "idCode": "ABCD1234ABCD123", "name": "ABCD", "terminalId": "ABCD1234" }, "destinationCurrencyCode": "840", "markUpRate": "1", "retrievalReferenceNumber": "201010101031", "sourceAmount": "100", "sourceCurrencyCode": "643", "systemsTraceAuditNumber": "350421" }

{ "cardAcceptor": { "address": { "city": "Foster City", "country": "RU", "county": "San Mateo", "state": "CA", "zipCode": "94404" }, "idCode": "ABCD1234ABCD123", "name": "ABCD", "terminalId": "ABCD1234" }, "destinationCurrencyCode": "840", "markUpRate": "1", "retrievalReferenceNumber": "201010101031", "sourceAmount": "100", "sourceCurrencyCode": "643", "systemsTraceAuditNumber": "350421" }

Any advice how I can represent this using an lb4 model command on the cli? Or other workarounds with nested objects. Thanks

Scott Switzer
Hi! I am trying to create a SOAP request with the following format: {parentnode: childnode: {$attributes: {ID: 1}, childnode{$attributes: {ID: 2}}
The resulting SOAP request only includes the last childnode - e.g. looks like since both child nodes are named the same thing, the second one overwrites the first.
I tried to put the child nodes into an array, but that does not work either
Does anyone have advice for me? I looked through all of the tests, and this case does not seem to be covered
BTW - using the strong-soap Node module
Scott Switzer
Um - sorted it out. {parent node: childnode: [a,b]}
Diana Lau
@wondenge , when creating the cardAcceptor model, you can specify type "object" as address. In the generated typescript class, you can:
address?: Address;
Francisco Buceta
Hey, how are you?
Can you help me? How can I execute a stored procedure and map it with a model?
Eduardo Mazzucchelli
hi people,
how can i to do, a query for get relation to idAction and idRecource ???
I have defined it !!!
Irnel Victoria Sosa
Why does the many-to-many relationship not appear in the official LB4 documentation? @raymondfeng @bajtos https://loopback.io/doc/en/lb4/Relations.html
Petro Darii

Hi, maybe anybody can help me?
I'm on loopback 4, I'm have two related tables, table A belongs to table B. I'm deleting row from table B, and need that corresponding row from table A become deleted too.
I use "cascade" option, but receiving error :

Unhandled error in DELETE /api/skill-criteria/f586baf7-11fd-4a27-bd53-3bafb29b80c2: 500 error: update or delete on table "skillcriteria" violates foreign key constraint "userskillcriteria_skill_criteria_id_fk" on table "userskillcriteria"

Any ideas?


Hi, can please somebody patiently gide me trough the process of deploying a Loopback app into an Apache Server? For example, I try to run 'npm run build' to get the folder with the production code, but it doesn't seem to work, but I expected it, because I am not having any environment files in my app. I read the docs, and it says:

"By default, a LoopBack application created with the application generator has two kinds of configuration files in the server directory that you use to configure production settings..."

But when I create a project, I cannot find these two files anywhere.

Any help is appreciated.

Also, can you explain me please why a 'dist' folder is containing the test folder?
I will explain better what is my problem.
I am working with LoopBack and MySQL for the database, and is happening that in my development environment I am not having any issues, but in the server, that have installed PM2 for handling the Node processes, it is happening that when I retrieve a timestamp value, I am getting a JSON with the time BUT it have 5 hours less than time in datase. I live in a country with GMT-5, so I guess that's the reason for subtracting 5 hours. The thing is that the server is running directly my developing code, just with changes in the datasource.json file so the connection with the production database can be done properly. My boss sugest me to make a build process for the code (as we do in the Vue project —we're working the front with Vue—) and just use that code in the production environment; so that is why I'm consulting how to do that production dist folder.
Hi ppl.
I have a use case where I need to call the "Third Party API" during the startup of the Loopback4 based server. Is there any way to do that? i.e. any way to call the other REST API during the booting of the loopback4?
Nico Flaig
@DanielJaramillo94 your time problem can be easily solved by using unix timestamps.
I'm implementing a new app/REST API from scratch. Our team is familiar/comfortable with nest.js and passport.js (we’ve used both in previous successful application rollouts; we want to use passport for our own custom authentication as well as 3rd-party auth). We’re considering using LoopbackJS instead of nest.js, but we’re concerned about its ability to tie in to passport.js. I’ve seen the example/tutorial with loopback3, but that’s conspicuously absent in the loopback4 documentation. Is the only authentication available in loopback4 the @loopback/authentication package? Any thoughts on integrating lb4 with passport (as we do with nest.js)?
Shawn Iwinski
Hello all -- Is there any documentation or tutorial available for how to create a custom LoopBack 4 connector? -- v2 has https://loopback.io/doc/en/lb2/Building-a-connector.html but i cannot seem to find the equivalent for v4
@nflaig thanks for your sugestion.
Anyways, I would like to know how to make the deploy in the Apache Server and get the answers for the things I mentioned. I really would like to learn LoopBack, I think is a great framework, but is lacking in documentation or I'm dumb.
How can I update my base-models (Role, RoleMapping, ACL) id to use uuids as opposed to auto-increment keys
I eventually managed to solve this by creating a custom model with similar base name but using lowercase letters then extended the base model
does loopback 3 supports where filter with skip + limit?
Olivier Ballerini-Gendrin
@Vsnuv_twitter : yes, it does. https://loopback.io/doc/en/lb3/Skip-filter.html
Olivier Ballerini-Gendrin

hi people, do you know about this error ???

"name": "wellnotes",

"error": {

Try naming your model “wellnote”?

Hi everyone, I’m Olivier, from wBat, France.
We are working on a product designed to help companies working in construction (houses, buildings…).
This message was deleted
Olivier Ballerini-Gendrin

We have a multi-tenant architecture, i.e. each company has it’s own mysql database.
And we have issues in guaranteeing that the data goes into the right database on concurrent requests.
Because we use attachTo on the models in a middleware before request execution.
So simultaneous requests cause simultaneous attachTo to be performed on the models, resulting in one wrong database for one of the request.
We tried to clone our models for our users (ie invoice becomes invoice42 for org 42 throug createModel + base model), but this leads to two issues :

  • a timeout because we have 60+ models to clone;
  • an issue with the clonning of the relations. How can we do it in a createModel situation ?

Every clue is welcome.

Frederic Lang

Hi, everyone
I am currently doing the todo tutorial with @loopback/cli version 1.21.6
I appears that the turorial has been made with a previous version of loopback cli. When I write the todo model, I get

? Enter the property name: id
? Property type: number
? Is id the ID property? Yes
? Is it required?: No
? Is id generated automatically? No
? Default value [leave blank for none]:

Can you explain the line "is the id generated automatically ?" ? I guess it does mean that if the id is not specified in the request, it is generated by loopback. Nevertheless, I believe loopback does generate an id even if this field is set to "No".
Thank you in advance,

Nico Flaig
@fredlnl the id will be generated by your datasource for example mongodb would generate an ObjectId like this 5d7f57d080c2ae1ea4fadec9. I am not sure what happens when you use in-memory datasource
Hi, everyone, I have got garbled characters when the data in dashdb is not English language, is it a defect of the connector I am using( loopback-connector-dashdb)? for the data can be showed as normal if I use jdbc to connect the dashdb, and retrieve the data.
how can I upload images here?
Hi, i'm trying to use graphQL, I followed this doc https://loopback.io/doc/en/lb4/exposing-graphql-apis.html but when I run npx openapi-to-graphql http://localhost:3000/openapi.json I've got the following error message : OpenAPI-to-GraphQL creation event error: OpenAPI-to-GraphQL currently cannot handle 'not' keyword in '{"title":"TodoOptional[todoListId]Excluding[id]","not":{"anyOf":[{"required":["id"]}]},"properties":{"title":{"type":"string"},"desc":{"type":"string"},"isComplete":{"type":"boolean"},"todoListId":{"type":"number"}},"required":["title"]}'
(node:18320) UnhandledPromiseRejectionWarning: AssertionError: component name invalid. Somebody is able to help me ?
A Quick question about implementing Microservices using loopback. As generally suggested the microservices should be loosely coupled. Then can anyone please explain how will the "relations" concept work in loopback keeping the above statement in mind. A)Should each microservice be built as a separate loopback application or
B)The models in a single loopback application should be considered as a microservice [But then would it hold the microservices properties? Individual Scaling etc]

When I do npm run build in Vue.js, the framework creates a dist folder that I can place in the htdocs of Xampp and then just open the project from localhost/vueApp.

I've been trying to also run npm run build in the LoopBack project, but the files generated cannot be runned by Apache because there is no .html file created in the dist folder; that makes sense for me, because this project is an API, not a web page.

The question is, can I run the LoopBack API from Apache? If yes, how?