Collection Backed by a Database Entity

Database Entity is the same solution as Join Table, with the addition of the Value Object that's only managed by the owner Entity. In the current scenario, consider that the Money Value Object is only used by the HistoricalProduct Entity; a Join Table would be overly complex. So the same result could be achieved using a one-to-many database relation.

Exercise
Think of the mapping required between HistoricalProduct and Money if a Database Entity approach is used.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset