Hi,

I just configured my NHibValidator. My NHibernate creates the DB
schema. When I set MaxLenght="20" to some property of a class then in
the database the length appears in the database column. I am doing
this in the NHibValidator xml file. But the problem is that I have
components and cannot figure out hot to achieve this behaviour. The
component is configured correctly in the Customer.hbm.xml file.

public class Customer
{
  public virtual string Name{get;set;}
  public virtual Contact Contacts{ get; }
}

public class Contact
{
  public virtual string Address{get;set;}
}

<?xml version="1.0" encoding="utf-8" ?>
<nhv-mapping xmlns="urn:nhibernate-validator-1.0"
                         namespace="MyNamespace"
                         assembly="MyAssembly">
  <class name="Customer">

    <property name="Name">
      <length max="20"/>
    </property>

    <property name="Contacts">
          ????
                  How to configure my Address with MaxLength="50" and
to reflect this length into the database column's length?
          ????
    </property>


  </class>
</nhv-mapping>

--

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