Hi everyone, I'm having a problem that, until now, I could not fix. What happens is this: When I create a new entity and call the Save() method, the base class (ActiveRecordValidationBase) calls the method BeforeSave (IDictionary state) and verifies that the entity is valid. If it is, persists, otherwise throws ValidationException. But when I have saved an entity and modify it (Update()), making some property invalid and try to save, the Save() method does not call BeforeSave(IDictionary state), so my entity is not validated. When the request ends, it validates the entity and throws the exception, however, as I am not in the context of my controller's action, I can not handle the error, and it gets displayed to the user. (yellow page)
Has anyone gone through this same problem, resolved? Or is it something I did wrong? Maybe some setting? The stackoverflow thread (see code): http://stackoverflow.com/questions/6050728/activerecordvalidationbaset-not-throwing-activerecordvalidationexception-on-sav -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en.
