In a scenario where you use an ORM to map your entities to the DB and you have setter validations (nullable, date lower than today validation, etc), every time the ORM gets a result, it will pass into the setter to instance the object.If I have a grid that usually returns 500 records, I assume that for each record it passes on all validations. If my entity has 5 setter validations, than I have passed in 2.500 validations. Does those 2.500 validations will affect the performance?If was 15.000 validation, it will be different?In my opinion, and according to this answer, setter validation is useful than constructors validation. Is there a way to avoid unnecessary validation, since I am safe to say thatthe values I send to the DB when saving the entity won't change until Iedit it on my system?
Setter Validation can affect performance?
performance;orm;validation