You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please note that i'm using mongodb and both ids, foreign keys are implemented via objectId. In one of the cases, the intersection fails when "targetEntityIds" is represented by a string array, while relatedIds is represented by a ObjectId array.
The intersecion fails, returning empty arrays.
Version 6.1.3 of @loopback/repository does not present the problem, i suspect it was introduced via commit 34f8201
POST /contact
body: { "value": "johnwayne@gmail.com"}
POST /contacts/{previousContactId}/people
body: { "name": "John", "age": "wayne"}
GET /contacts/{previousContactId}/people
corectly return related models
GET /contacts
filter: {where: {id: previousContactId }, include:[{"relation": "people"}]}
Does not return correctly related models. Expecting the same output as of point 3.
The text was updated successfully, but these errors were encountered:
Describe the bug
After the release of @loopback/repository 6.1.4 about 6 hours ago, my hasManyThrough relations stopped working.
After a quite good amount of hours addressing the issue, got suspicious about this line: https://github.com/loopbackio/loopback-next/blob/master/packages/repository/src/relations/has-many/has-many-through.inclusion-resolver.ts#L271
Please note that i'm using mongodb and both ids, foreign keys are implemented via objectId. In one of the cases, the intersection fails when "targetEntityIds" is represented by a string array, while relatedIds is represented by a ObjectId array.
The intersecion fails, returning empty arrays.
Version 6.1.3 of @loopback/repository does not present the problem, i suspect it was introduced via commit 34f8201
Logs
No response
Additional information
No response
Reproduction
Repository: https://github.com/ivanvaccari/lb4-HasManyThrough-test
Run the following sequence of rest calls:
POST /contact
body:
{ "value": "johnwayne@gmail.com"}
POST /contacts/{previousContactId}/people
body:
{ "name": "John", "age": "wayne"}
GET /contacts/{previousContactId}/people
corectly return related models
GET /contacts
filter:
{where: {id: previousContactId }, include:[{"relation": "people"}]}
Does not return correctly related models. Expecting the same output as of point 3.
The text was updated successfully, but these errors were encountered: