Answer the question
In order to leave comments, you need to log in
What is the purpose of mapstruct?
I didn’t find anything in RuNet on mapstruct in which cases should it be used?
As I understand it, issuing an entity (Entity) in REST json is a bad tone, but why, then, in all courses, mapping is not affected or misunderstood?
If possible, give examples of using mapstruct from real projects
Answer the question
In order to leave comments, you need to log in
user_id | transport_type | transport_id
transport_type - will indicate in which table to look for transport_id, you can call transport_table and write the table name right away, but this is not kosher)
ПользовательТранспорта:
имя
транспорт пользователя = ManyToMany(ТипТранспорта)
...
ТипТранспорта
название
...
Can be done on 2 tables.
table user_transport:
user_id | transport_id
table transport:
id | params | value
1 | transport_type | bus
1 | name_param1 | value1
1 | name_param2 | value2
and so on
2 | transport_type | metro
2 | name_param1 | value1
2 | name_param2 | value2
and so on
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question