but i guess it would neither be correct to do this management from UseCase/Interactor because that would expose how is database implemented. What do you think about it?
I don't see why it would be a bad idea having a InsertUserWithAddressUseCase which internally uses two different DB repositories.
I'm going to guess that the technology that you're using for the database layer is Room. This is a very brute, raw example of how that would look like, let me know if it fits your needs, or if you're looking for something else:
I guess that you actually have a more complex situation going on, but if you actually need to just insert one record that has a one-to-many relationship there are way easier ways to do it than the one above.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't see why it would be a bad idea having a
InsertUserWithAddressUseCase
which internally uses two different DB repositories.I'm going to guess that the technology that you're using for the database layer is Room. This is a very brute, raw example of how that would look like, let me know if it fits your needs, or if you're looking for something else:
gist.github.com/4gus71n/2c0b0fe131...
A note though: