When I try to access default repository code I want to control some values before executing the default crud function in repository. How to I achive that?
ex:
...
@repository.getter('PersonRepository') private personRepositoryGetter: Getter<PersonRepository>
...
...
someEndpoint(){
const personRepository = await this.personRepositoryGetter();
const createdPerson = await personRepository.create(someData)
}
...
In personRepository.create() I want to write intercept. What is the best way to do that?
Hi see Access to data before writing to the databases in:
https://loopback.io/doc/en/lb4/LB3-vs-LB4-request-response-cycle.html#access-to-data-before-writing-to-the-databases"