Mapping to model with parent reference when DTO does not have that reference as a property #1066
Replies: 1 comment
-
This looks like a pretty advanced mapping that is not supported by Mapperly. You may want to implement it yourself. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been trying to figure out whether Mapperly can solve my Domain/DTO mapping issues but I'm struggling to answer that question right now. I've never used Mapperly before but it looks appealing. Basically, I have a domain model, with child models where the child models have a reference to the parent. However, the DTO does not have these references as it's not necessary to persist them since it's all stored as a single nested document in a document store.
My models look something like this:
I want to be able to map from
ParentDto
toParentDomain
when retrieving data from persistence, but I'm not sure how to resolve the Child -> Parent reference, since the DTO does not have a parent reference. Is this possible with Mapperly?This discussion seems similar but I was struggling to find myself an answer there: #849
Beta Was this translation helpful? Give feedback.
All reactions