How to do populating array of Object IDs in LB4 #7148
Unanswered
noufalnoufu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to do array populate in lb4, I found the solution in lb3 in stackoverflow,
https://stackoverflow.com/questions/51887050/loopback-relations-not-populating-array-of-object-ids
Can anybody help me on this ?
Model A :
{
id: 100,
bIdList: [200, 201]
}
Model B :
{
id: 200,
active: true
},
{
id: 201,
active: false
}
Result should be like this
{
id: 100,
bIdList: [200, 201]
bRelation: [
{
id: 200,
active: true
},
{
id: 201,
active: false }
]
}
Beta Was this translation helpful? Give feedback.
All reactions