Questions tagged [loopback3]

15 questions
1
vote
0 answers

loopback3: associate users to different databases

I'm developing a project in loopback3 where I need to create accounts for multiple companies, where each compnay has its own database, I'm fully aware that the loopback3 docs has a section where they explain how to create datasources…
AIMEUR Amin
  • 149
  • 16
1
vote
1 answer

How to add NOLOCK for Auto generated SQL queries in Loopback 3

I'm using Loopback 3 and SQL. We've 20 million rows in SQL tables and when we query data using Loopback it's taking a lot of time and further observation we found queries are blocking in SQL. Noticed that the Loopback auto generated queries doesn't…
Prasad Kanaparthi
  • 5,832
  • 3
  • 30
  • 55
0
votes
0 answers

Loopback 3 updateAll filter is not working

I have the following model in Loopback 3: { "name": "rehearsalTest", "base": "PersistedModel", "idInjection": true, "options": { "validateUpsert": true }, "properties": { "creationDate": { …
LeoLozes
  • 1,238
  • 1
  • 15
  • 26
0
votes
0 answers

loopback4 creating controller by command line without prompt question

I want to create a controller with command line by providing all arguments to create it without any question by prompt. What arguments I have to add as arguments into the command line not to prompt me any question? My command line: lb4…
canmustu
  • 1,426
  • 2
  • 16
  • 28
0
votes
0 answers

loopback4 creating repository by command line with config.json

I want to create a repository with command line by providing all arguments to create it without any question by prompt. My config.json: { "name": "test", "model": "test", "datasource": "db", "repositoryBaseClass": "DefaultCrudRepository", …
canmustu
  • 1,426
  • 2
  • 16
  • 28
0
votes
0 answers

loopback4 creating datasource by command line with config.json

I want to create a datasource with command line by providing all arguments to create it without any question by prompt. My config.json: { "name": "db10", "connector": "mongodb", "url": "", "host": "localhost", "port": 27017, "user":…
canmustu
  • 1,426
  • 2
  • 16
  • 28
0
votes
1 answer

how to proxy to my domain with port from request urls that start with api?

I have a loopback 3 set up listening on the port 3000. And my front end app is built with Vue JS. ( I uploaded dist files to the server). Whenever I make an api call (https://example.com/api/xxx), I need to proxy to…
0
votes
0 answers

Cannot read property 'connector' of null in Loopback 3

i have problems when i trying to run raw mongodb queries on Loopback 3, here is my code : MyModel.getDataSource().connector.connect(function(err, db) { var collection = db.collection('my_model'); collection.aggregate([ {$group : {…
azukhrufy
  • 1
  • 1
0
votes
1 answer

loopback4 application reads loopback3 models after migration

I migrated my loopback3 application to loopback4, as a last step of migration, I migrated loopback3 models, but when I change my model variables in loopback4, migrated application does not read that changes, It continues to read models from…
0
votes
0 answers

How to disable email case sensitive For User while creating and login?

In Loopback what exactly required is Like Name@gmail.com and name@gmail.com Should be considered the same But in loopback, I am not able to know how to achieve that while the user login into the application. Loopback always considers two different…
Chandela
  • 144
  • 13
0
votes
0 answers

How to properly manage both roles and statuses as ACLs in Loopback?

In my app I need to combine two different access control mechanisms that should work together: roles and statuses. So a user can have different roles like admin, guest, teammember etc. This is already implemented by using Roles, role mappings and…
Denis Yakovenko
  • 2,398
  • 3
  • 38
  • 70
0
votes
0 answers

Rest connector with Loopback 3.x (loopback-connector-rest)

I'm new with loopback (I'm using 3.27 version). I'm trying to call an endpoint REST that gives me a json. I created a Datasource: { "connector": "rest", "debug": false, "options": { "headers": { "accept": "application/json", …
Danilo Del Fio
  • 131
  • 2
  • 8
0
votes
1 answer

loopback tx.notifyObserversOf not a function error

In Loopback3, i am migrating from oracle to postgres and switched connectors and changed models just fine. Only error i have is this: TypeError: tx.notifyObserversOf is not a function at Timeout._onTimeout…
Nicos
  • 304
  • 2
  • 18
0
votes
2 answers

How to pass winston logger object to Shared models in Loopback3

I'm using Loopback3 and trying to log message for shared model that are outside of project folder. My project folder structure looks like below myproj\server\logger.js // using winston logger here myProj\common\models\ // I've couple of models…
Prasad Kanaparthi
  • 5,832
  • 3
  • 30
  • 55
-1
votes
1 answer

Howto create indexes using Loopback 3 and mongo

I have a model definition as such (snipped for sake of readability): { "name": "PlannerArchive", "base": "PersistedModel", "idInjection": true, "options": { "validateUpsert": true, "strictObjectIDCoercion": true }, "properties":…
batman567
  • 642
  • 1
  • 5
  • 17