Skip to content

How to interact with the data that is going to be mapped. #6

@ovflowd

Description

@ovflowd

What I mean is the following:

  1. Suppose I have a scenario with a Model called Data with these two attributes: serviceId and values
  2. I need first check if the serviceId is valid with the Rule pattern, if is, the mapping continues.
  3. After that I retrieve the parameters from that Service by the serviceId (parameters is a property from the Service Model).
  4. I rearrange/sort the values property from the Data model that is being mapped, according to the parameters from the Service model that is stored in the database.

How could I do the item 4? With cweiske/jsonmapper I was only doing setters in order of achieve that.

Does this library also uses setters in order to set a custom mapped data with the input data?

Or could I use the Rule pattern? or does there exists another pattern? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions