Replies: 1 comment
-
I'm not entirely sure if I understand your use case, but a calculation shouldn't happen within the mapper. That's not the intended purpose of a mapper (a mapper shouldn't handle business logic). Could you please provide an example of how the code would look if you were to write it manually? |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I've had a dig through the API docs and a play about cant seem to find any way to do this inside mapperly.
So basically I have a "Mileage" figure in my database that represents the total Mileage covered. The client software I am programming against sends a Mileage value which represents the Mileage covered in that session. I have made a mapping as per API docs to update an existing target entity (https://mapperly.riok.app/docs/configuration/existing-target/) however I want to make a UserMapping for the Mileage value that takes the Mileage value from the target entity and adds the source entity Mileage to it.
Is this possible at all in Mapperly's current state without having to add code after a call to Mapprely's auto-generated mapping code? Would be nice to be able to do this all within the mapping code if possible?
Any input etc would be greatly appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions