i have a log case. i added it below.
And my codes are here too.
ValidatorEngine validatorEngine = new ValidatorEngine();
validatorEngine.Configure();
InvalidValue[] invalidValues = validatorEngine.Validate
(medicalExaminationVisit);
InvalidValue[] invalidValues2 = validatorEngine.Validate
(medicalExamination);
i debug these codes using xml files that i sent in previous message.
At the end of debug, "invalidValues" array has no invalid values. But
"invalidValues2" array has 9 invalid values. medicalExaminationVisit
object has medicalExamination bject. I mean they are the same object.
i hope these helps to solve this problem.
10:37:47 [10] DEBUG NHibernate.Validator.Cfg.MappingLoader - Assembly
NHValidatorDeneme
10:37:47 [10] INFO NHibernate.Validator.Cfg.MappingLoader - Searching
for mapped documents in assembly: NHValidatorDeneme
10:37:47 [10] INFO NHibernate.Validator.Cfg.MappingLoader - Mapping
resource:
NHValidatorDeneme.Constraint_Files.MedicalExamination.nhv.xml
10:37:47 [10] INFO NHibernate.Validator.Cfg.MappingLoader - Mapping
resource: NHValidatorDeneme.Constraint_Files.MedicalVisit.nhv.xml
10:37:47 [10] INFO NHibernate.Validator.Cfg.MappingLoader - Mapping
resource:
NHValidatorDeneme.Constraint_Files.MedicalExaminationVisit.nhv.xml
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : Complaint
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 20
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Complaint to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Complaint to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : History
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member History to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : SymptomAndExamination
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 20
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member SymptomAndExamination to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member SymptomAndExamination to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : Study
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 50
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Study to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Study to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : Diagnosis
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 100
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Diagnosis to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Diagnosis to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : Treatment
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 50
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Treatment to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Treatment to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : PatientBackground
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 50
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member PatientBackground to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member PatientBackground to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : AncestorialBackground
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 50
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member AncestorialBackground to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member AncestorialBackground to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : PursuanceNote
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member PursuanceNote to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : Department
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 20
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Department to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Department to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : AcceptanceDate
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Past attribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member AcceptanceDate to dictionary with attribute
NHibernate.Validator.PastAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : InsuranceCompany
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 20
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member InsuranceCompany to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member InsuranceCompany to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : ApplyReason
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 50
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member ApplyReason to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member ApplyReason to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : ComplaintArea
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 100
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member ComplaintArea to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member ComplaintArea to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : MedicalExamination
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member MedicalExamination to dictionary with attribute
NHibernate.Validator.ValidAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : Department
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 20
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Department to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member Department to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : AcceptanceDate
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Past attribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member AcceptanceDate to dictionary with attribute
NHibernate.Validator.PastAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : InsuranceCompany
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 20
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member InsuranceCompany to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member InsuranceCompany to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : ApplyReason
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 50
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member ApplyReason to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member ApplyReason to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Looking for rules for property : ComplaintArea
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to Length attribute with min 0, max 100
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member ComplaintArea to dictionary with attribute
NHibernate.Validator.LengthAttribute
10:37:47 [10] INFO
NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory -
Converting to NotEmptyAttribute
10:37:47 [10] INFO NHibernate.Validator.Mappings.XmlClassMapping -
Adding member ComplaintArea to dictionary with attribute
NHibernate.Validator.NotNullNotEmptyAttribute
On Oct 24, 4:16 am, Fabio Maulo <[email protected]> wrote:
> Have you a test or a show case ?
> You are doing something wrong somewhere.
>
> 2009/10/23 spykketron <[email protected]>
>
>
>
>
>
> > I have three classes named MedicalExamination, MedicalExaminationVisit
> > and MedicalVisit. MedicalExaminationVisit is inherited from
> > MedicalVisit. MedicalExamination is a property in
> > MedicalExaminationVisit.
>
> > I tired to save only MedicalExamination, validate method of Nhibernate
> > Validator works. But when I tried to save MedicalExaminationVisit, the
> > method does not validate MedicalExamination.
>
> > I use XML files for validation. And in MedicalExaminationVisit.nhv.xml
> > file I use "Valid" constraint for MedicalExamination as you can see
> > below.
>
> > <class name="NHValidatorDeneme.MedicalExaminationVisit,
> > NHValidatorDeneme">
> > <property name="MedicalExamination">
> > <valid/>
> > </property>
> > </class>
>
> > so, how to validate child object using xml files?
>
> --
> Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---