You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, there is no way to map a single object to multiple classes, we can't use the AsMapper attribute multiple time but we also can't override / extend the method "supports".
I think it would be beneficial to have a default "supports" handler that can also have more conditions, this could be done either on the Mapper by adding another supports method, or on the MapperConfig with ExpressionLanguage that have access to the $from object to have simple conditions.
My use case is the following:
In my current software I have a generic datetime type, and I'm trying to map my object to a 3rd party API that represents them as either a date or a datetime (that's more complex than since its not just a date/datetime but a whole object). I'd rather not having a generic object that matches the structure of the API as I don't want to implement every little quirks of the 3rd parties just to satisfy my mapper, in this case I'd like to have a mapper that supports the generic object that has the "withTime" to true in a first mapper and one that has the "withTime" to false in a second mapper.
The text was updated successfully, but these errors were encountered:
Hi,
As far as I can tell, there is no way to map a single object to multiple classes, we can't use the AsMapper attribute multiple time but we also can't override / extend the method "supports".
I think it would be beneficial to have a default "supports" handler that can also have more conditions, this could be done either on the Mapper by adding another supports method, or on the MapperConfig with ExpressionLanguage that have access to the
$from
object to have simple conditions.My use case is the following:
In my current software I have a generic datetime type, and I'm trying to map my object to a 3rd party API that represents them as either a date or a datetime (that's more complex than since its not just a date/datetime but a whole object). I'd rather not having a generic object that matches the structure of the API as I don't want to implement every little quirks of the 3rd parties just to satisfy my mapper, in this case I'd like to have a mapper that supports the generic object that has the "withTime" to true in a first mapper and one that has the "withTime" to false in a second mapper.
The text was updated successfully, but these errors were encountered: