I started to learning promise with loopback and jsforce, and couldn't handle this problem; I couldn't return status var inside promise to cb() function.  Basically i want to connect salesforce and get data via JSforce and write it to db via...
I have two models Purchase and Products, and productId is common for both.  I need to find the productDetails from product model for a purchaseId.  So I have created a custom endpoint in Purchase model, called getProductDetails.  This is how I am try...
I want to setup an OAuth 2.0 Server using Loopback using a package called loopback-component-oauth2  The documentation is here : https://docs.strongloop.com/display/public/LB/OAuth+2.0#OAuth2.0-UsingtheOAuth2component  But it is very unclear, what mo...
I'm using Loopback from Strongloop as a REST framework and ORM. I want to use TypeScript for my business logic.  However, Loopback requires JavaScript with a specific shape to support their framework. For example:  module.exports = function(Perso...
We've been trying to implement ACID transactions in Loopback without success. The only examples in the documentation use the 'create' method.We've tried completely overriding the events as well as multiple variations of Operation Hook...
Is it possible to hide the id attribute in a method in swagger-ui generated by explorer in Strongloop Loopback? I don want the user to create a new resource and send the id attribute. I know that if the user send the id it can be ignored but I want t...
When we have model and we want to migrate it to database, we simply create script in server/boot with:  server.dataSource['myDbSource'].automigrate('MyMode', function(err){...})   or  server.dataSource['myDbSource'].autoupdate...
I'm new to loopback.js. I want to use the ES6 syntax for classes.   How to achieve this using the way that the models are defined by loopback?  module.exports = function(MyModel) {   MyModel.on('dataSourceAttached', function(obj){     var...
I want a model to represent a profile in my loopback app. But, the built-in User model found in loopback only have the following properties   username password realm emailVerified   What is the best way to extend the built-in User model in order to i...
I have tried an example from http://apidocs.strongloop.com/loopback/#model:  MyModel.on('changed', function(inst) {   console.log('model with id %s has been changed', inst.id);   // => model with id 1 has been changed });   I repla...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.