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
Description / Steps to reproduce / Feature proposal
Previously, hasMany relations showed up in GET requests as null properties. Now they are stripped out, even if the hasMany properties are filled in manually.
I think it's related to removing the array property from hasMany properties 56ab017 #1944
For example, if User model hasMany Experience models, sometimes we would have GET requests look like:
let user = await this.userRepository.getById(id); user.experiences = await this.userRepository.experiences(profile.id).find(); return user;
Right now, no matter what is in user.experiences, the whole property is stripped from the response. Logging before the response confirms that the object has an experiences array.
I confirmed it's due to a recent change in '@loopback/repository' by changing versions.
Current Behavior
HasMany properties are stripped from responses.
Expected Behavior
If the array is manually populated, it should be returned. We didn't mind returning NULL properties otherwise.
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.
Description / Steps to reproduce / Feature proposal
Previously, hasMany relations showed up in GET requests as null properties. Now they are stripped out, even if the hasMany properties are filled in manually.
I think it's related to removing the array property from hasMany properties
56ab017
#1944
For example, if User model hasMany Experience models, sometimes we would have GET requests look like:
let user = await this.userRepository.getById(id); user.experiences = await this.userRepository.experiences(profile.id).find(); return user;
Right now, no matter what is in user.experiences, the whole property is stripped from the response. Logging before the response confirms that the object has an experiences array.
I confirmed it's due to a recent change in '@loopback/repository' by changing versions.
Current Behavior
HasMany properties are stripped from responses.
Expected Behavior
If the array is manually populated, it should be returned. We didn't mind returning NULL properties otherwise.
See Reporting Issues for more tips on writing good issues
The text was updated successfully, but these errors were encountered: