loopback icon indicating copy to clipboard operation
loopback copied to clipboard

Following lb3 Getting Started II after step 1, from command line doesn't create 'forceId:false' that is required for tutorial app to work

Open ambrt opened this issue 9 years ago • 2 comments

Starting with Getting Started II step 1:

git clone https://github.com/strongloop/loopback-getting-started-intermediate.git cd loopback-getting-started-intermediate git checkout step1 npm install

and following page Create new models to create Review model from command line, doesn't create forceId:false in review.json

The forceId:false is required for Editing own review in tutorial CoffeeShop app. Without it app returns:

Unhandled error for request PATCH /Reviews?id=58ff47d1c556c54ebd68b98e: ValidationError: The Review instance is not valid. Details: id can't be set (value: 58ff47d1c556c54ebd68b98e).

The repo loopback-getting-started-intermediate step 2 has forceId
So there is a mismatch between following tutorial and step 2 repo.

ambrt avatar Apr 25 '17 13:04 ambrt

@ambrt It works fine when I reproduce. forceId field won't be created by default, you can create a field and set it to true or false. Does that answer your query? Shall I close the issue?

siddhipai avatar May 31 '17 21:05 siddhipai

Yes, thanks.

ambrt avatar Jun 01 '17 20:06 ambrt