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
{{ message }}
Repository navigation
BindingScope.SINGLETON scope not working as expected? #6728
this instantiates the repository and gets back the expected result. After this, I am manually setting some properties on the repository class so that it could be used ahead in the future.
But when I hit an controller endpoint for the first time which injects this repository ,
export class UserController extends AuthenticationControllerMixin<
User,
Constructor<Object>
>(Object, options) {
constructor(
@inject('repositories.UserRepository')
public userRepository: UserRepository,
@service(ImagekitProvider) public imagekit: Imagekit
) {
super();
}
it creates a new instance of the Repository again, but further API hits don't.
What would be the reason the new Repository instance is getting generated 2 times
with the application.get.
when hitting a Controller endpoint for the first time.
Activity