Re: [loopbackjs] forceId on buit-in models

11 views
Skip to first unread message
Message has been deleted

Raymond Feng

unread,
Jan 18, 2017, 6:29:02 PM1/18/17
to loopb...@googlegroups.com
You can probably do the following:

loopback.Role.settings.forceId = false;

Thanks,
Raymond
On Jan 18, 2017, at 3:27 PM, Felipe Toffolo <felipe....@gmail.com> wrote:

hello, i'm trying to migrate to loopback 3. But i have a problem.
I have some logic that depends of defining the id in the Roles insert.
Does anyone know how to change the forceId to false in a built-in model on loopback3?

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/395b0d9a-c3cf-40f1-a475-895830b279cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Kelly

unread,
Jan 18, 2017, 10:35:32 PM1/18/17
to LoopbackJS
"Role": { "dataSource": "db", "public": false, "options": { "validate": true, "forceId": false } }

Felipe Toffolo

unread,
Jan 19, 2017, 7:05:11 AM1/19/17
to LoopbackJS
Worked very well.
Thanks
Reply all
Reply to author
Forward
0 new messages