Modeling entities in JDLÂ
Since we have already used the JDL studio when we were setting up our monolithic application, it's time to update it.Â
As discussed in the previous chapter, we will move the entities from a monolithic application to a gateway application, then, remove the invoice-related entities from the monolithic application, use them in our invoice microservice, and then update the related invoice references in that. Finally, we create entities for the notification microservice.Â
The following diagram shows our new JDL entity model:Â
The invoice is a perfect candidate to move out into a separate service. We can completely decouple invoice and its dependencies, but this will cause one problem in our current application—the ProductOrder
entity is related to the Invoice
table and we have to remove this dependency while keeping the relationship (but not as a foreign key) as an indirect key in ProductOrder
that connects with the Invoice
 entity.
This can be achieved in two ways. We can...