Answer the question
In order to leave comments, you need to log in
How to pass an object from one repository to another in Spring?
I have two repositories. In the first one, I have candidates for a coach, and in the second, already a coach. I want to make sure that the admin has the opportunity to press the confirm button and the candidate becomes a coach. I understand that for this it is necessary that the candidate object, after pressing the key, passes from the candidate repository to the trainer repository. And now the logical question arises how to transfer an object from one repository to another in Spring?
Answer the question
In order to leave comments, you need to log in
Good afternoon!
As a colleague Dmitry Roo noted :
In general, it seems to me that your architecture is not very well thought out.
It would be better to make separate users and separate roles.
Converter<S, T>
) You don't have to transfer anything.
You create a new object.
Delete the old one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question