.... there are time when I would cry...
I sent you a link for the whole post series talking about NHV... one of the
post is this
http://fabiomaulo.blogspot.com/2009/02/nhibernatevalidator-fluent-interface.html

<http://fabiomaulo.blogspot.com/2009/02/nhibernatevalidator-fluent-interface.html>a
good approach when you have a problem is spent 30 minutes to read the posts
series wrote by one of NHV's developers.

2010/2/15 ilie <[email protected]>

> Hi,
>
>  Thanks a lot for the message... As usually things doesn't work from
> the first shoot....
>
>  I now that this is a newbie question... but i could not find
> "NHVConfiguration" class.... i could not import it...
>
>  I don't know it which package, dll is.... i seek it but i could not
> find it....
>
>  I am trying to use programmatic configuration.
>
>  Please could someone.... give me an hand ?
>
> Thanks
>
> On Feb 13, 7:22 am, Fabio Maulo <[email protected]> wrote:
> > http://fabiomaulo.blogspot.com/2009/10/nhibernatevalidator-nhibernate...
> >
> > <http://fabiomaulo.blogspot.com/2009/10/nhibernatevalidator-nhibernate..
> .>The
> > whole series is:http://fabiomaulo.blogspot.com/search/label/Validator
> >
> > 2010/2/13 ilie <[email protected]>
> >
> >
> >
> > > Hi,
> >
> > >  I have an issue in applying validation against my data. I am able to
> > > create tables, manipulate entities using NHibernate but i could not
> > > validate them...
> >
> > >  I was trying to do this using xml configuration. I followed this
> > > steps:
> >
> > >  1. i applied constraints to my entities something like:
> >
> > > [NotNullNotEmpty]
> > > [Length(25)]
> > > public virtual String StudentName { get; set; }
> >
> > > 2. i create an nhvalidator.cfg.xml file on root if my project having
> > > this content:
> >
> > > <?xml version="1.0" encoding="utf-8" ?>
> > > <nhv-configuration xmlns="urn:nhv-configuration-1.0">
> > >  <property name="apply_to_ddl">true</property>
> > >  <property name="autoregister_listeners">true</property>
> > >  <property name="default_validator_mode">UseAttribute</property>
> > >  <mapping assembly="NHibernate.Validator.Demo.Model"/>
> > > </nhv-configuration>
> >
> > > 3. configure settings
> >
> > >    [TestFixture]
> > >    class GenerateSchema_Fixture
> > >    {
> > >        [Test]
> > >        public void Can_generate_schema()
> > >        {
> > >            var cfg = new Configuration();
> > >            cfg.Configure();
> >
> > >            ValidatorEngine engine = new ValidatorEngine();
> > >            engine.Configure();
> >
> > >            cfg.AddAssembly(typeof(Student).Assembly);
> >
> > >            new SchemaExport(cfg).Execute(false, true, false);
> > >        }
> > >    }
> >
> > > All things goes right, tables are create on SqlServer  and so on...
> > > only issue is validation part(tables are createed on SqlServer using
> > > default values for columns, regardless my validation
> > > constraints)... .I am not sure if it is right too call validation
> > > configuration after hibernate configuration in the same test method...
> > > I am confused were to call it, and if my  steps in configure it ar
> > > right...
> >
> > > Please if you have an idea give me an hand...
> >
> > > 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]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/nhusers?hl=en.
> >
> > --
> > 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>


-- 
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.

Reply via email to