-
Task
-
Resolution: Done
-
Minor
-
None
-
None
-
False
-
-
False
-
-
MapStruct provides a feature @AfterMapping that we should use when converting dtos to entities and populating contract_uuid across the Set<ContractMetrics>. I had this working successfully at one point, but then I introduced a lombok @Builder which broke it. In the interest of time, it was faster to manually do contract.getContractMetrics.forEach() in a couple of places than figure out how to make MapStruct work again.
There is a commented out reference to this in the ContractMapperTest class that should be revised/uncommented to check that this is fixed.
Resources:
https://www.baeldung.com/mapstruct
https://stackoverflow.com/questions/59028797/aftermapping-is-not-called-from-mapper-interface