Closed shrralis closed 1 year ago
Thanks for raising this issue! I am sure it once was possible.
I fixed it and added a unit test, so that it stays like this :)
Funny thing: I have just stumbled over my own documentation :laughing:
* * Your source does not have the information for a target with default value
* ```kotlin
* @KonvertTo(CarToRepair::class, mappings=[
* Mapping(target="defect", ignore=true)
* ])
* class Car
* class CarToRepair(val defect: Boolean = true)
* ```
So it was working as expected, I just forgot about that :/
Is there a way to avoid
io.mcarle.konvert.processor.exceptions.PropertyMappingNotExistingException: No property for...
?In my case, there's an Entity with a property with a default value:
and a DTO without the field:
Is there a way to respect the default value declared in the
Entity
constructor? Having smth like@Konvert(mappings = [Mapping(target = "something", constant = "false")])
seems really redundant