I am trying to use hexagonal architecture in my new project but I am a little bit confused about my connections between domain objects.
For example, I have User class, which is domain class. This class should be connected with Film class by one-to-many relation.
So I will create two different modules, first will be Users second will be Films.
How to use @OneToMany relationship from Hibernate in this situation without changing visibility scope of domain classes?
I am thinking about creating DTO's which are public and wire them together.
Do you know any example of usage hexagonal architecture with relational databases? I am only managed to find examples of no-SQL databases. How to use this approach with SQL databases in general?
In my project, I will use spring boot, hibernate and MySQL.
Thanks.
Aucun commentaire:
Enregistrer un commentaire