Cache the result in the method that that validator calls out to instead. /Gunnar
On Oct 11, 5:45 pm, kor <[email protected]> wrote: > hi, i'm using validator integrated with nhibernate in a web form app > with asp.net 2.0. > > in same pages where an user can create new objects i explicitly check > if the new object is valid before saving it so i can display the > validation errors with custom html. > > i have same custom validators that go to the db (for example to check > if the name property of the new item is unique), at the moment all > this db trips are doubled, becouse validation occurs when i call it > explicitly and when it will be called by the nhibernate event on > flush. > > i want know if there's same way to cache a validation result or to > tell to the validation framework to don't chekc the validity of a > specif entity becouse i had already validate it. > > ps.i don't want to remove the automatic validation made on flush > becouse it helps to prevent bug when samebody saves new objects > without validate them before or when i save new objects and i don't > need to manage invalid values (it's enough the exception thrown on > flush) > > thanks -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
