NHibernate Validator: event listener regards attributes but not ValidationDefs?

I had the same problem you were having and it turns out I wasn't initializing my SharedEngineProvider and when it went to validate my entity it was creating a new instance of a validator engine to try and validate it. This engine did not contain the rules that I originally configured it with obviously. Here is the post with my problem and solution.

I had the same problem you were having and it turns out I wasn't initializing my SharedEngineProvider and when it went to validate my entity it was creating a new instance of a validator engine to try and validate it. This engine did not contain the rules that I originally configured it with obviously. Here is the post with my problem and solution: Nbernate Validator not integrating with Fluent Nbernate Edit: Also make sure that you have the following (this is also in the post above): //Registering of Listeners and DDL-applying here ValidatorInitializer.

Initialize(cfg, engine).

Thanks but my engine instance is actually containing the rules. Its just that the PreInsertEventListener that NHV registers, doesn't get initialized for some reason. – Sandor Drieënhuizen Apr 17 at 20:57 If you validate your 2nd instance first does it make a difference?

Do you still not get the InvalidStateException? – Cole W Apr 17 at 21:11 Also take a look at my edit above. – Cole W Apr 17 at 21:19.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions