Comments (7)
I hope the implementation doesn't need to validate every time, just after the TypeMap is created or changed, if that makes sense? Maybe validateBeforeMap
for the configuration name?
from modelmapper.
What is the way to achieve this with validate?..
from modelmapper.
I think the idea behind this issue was that we would automatically run validate before the first ModelMapper.map
attempt for some TypeMap
which would cause the map
attempt to fail if some destination properties are unmapped. Each time the TypeMap changes, we'd need to flag it for validation again the next time ModelMapper.map
is called.
from modelmapper.
That's a good idea, actually. Need help to implement that?
from modelmapper.
I'll leave it to @chhsiao90 to consider implementation since he owns the project now. I just wanted to at least share what I was (probably) thinking when I wrote this :)
from modelmapper.
Recently I'm a little busy at my side project, I'm not sure that I have time to pick this up. PR is welcome๐ .
Is that we can describe this issue with Adds a configuration flag, maybe called validateEveryTime, and when we enabled this flag, the modelMapper will validate the map and the destination every time when a mapping action happened.
from modelmapper.
Got it, that makes sense!
from modelmapper.
Related Issues (20)
- How to skip not loaded Lazy fields?
- Test fails after upgrading from 3.1.0 to 3.1.1
- Java 21 support HOT 18
- Support of Java Module System
- Custom mapping in nested objects HOT 4
- Skip field of generic class HOT 1
- Mapping Source object to Destination object
- Mapping nested generic object with generic HOT 1
- Use specific converter for one field
- Model Mapper does not map values correctly (Intermittent - once in a few tries)
- Model Mapper Low performance
- Jackson Module: @JsonTypeInfo support for automatically handling inheritance HOT 1
- ModelMapper fails to map nested entity user field HOT 1
- When condition does not work for null-field
- How to ignore mapping errors HOT 1
- ModelMapper not working with nested generics
- modelmapper Hot deployment HOT 1
- How to Throw Validation exception when Source has a property that cannot be mapped to Destination HOT 1
- Test dependencies upgrade
- Basic Mapping doesn't work as expected.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modelmapper.