Validation events not firing when updating

Posts   
 
    
Krish
User
Posts: 91
Joined: 02-Jan-2008
# Posted on: 31-Mar-2009 09:03:52   

I am using LLBLGen 2.6 Final, Self servicing two class, .Net Framework 3.5 C#.

I am using DI and validator classes (derived from ValidatorBase class) to do some validation before saving an entity. So I am overriding ValidateEntityBeforeSave method to achieve this.

My problem is, ValidateEntityBeforeSave method is automatically called when I call the save() method on the entity when adding a new record (entity) but not when updating a record?

Why does not ValidateEntityBeforeSave method get called when updating?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 31-Mar-2009 10:55:02   

Is there something o updae in these entities, are there dirty fields to be updated? Do you see the records get updated in the database?

Please post the code of ValidateEntityBeforeSave.