Using ConfORM
mapper.Customize<Credencial>(
c => c.Property(pm => pm.Estado, x => x.Column(cm => cm.Default((int)
EstadoCredencial.Inactiva))));

The property "Estado" is an enum persisted with its value (not as string).
public enum EstadoCredencial
{
NoDefinida,
Inactiva,
Activa
}

The XML chunk that ConfORM give me is :
      <property name="Estado" access="nosetter.camelcase-underscore">
        <column name="CredencialExternaEstado" unique="false" default="1" />
      </property>

As you can see the "default"value is there.

Are you ConfORM ?

P.S. The serialization create that "unique" tag... I'll change the NH's XSD.

2010/3/4 Tuncer Karaaslan <[email protected]>

> Hi Fabio,
>
> Greetings from Turkey :)
>
> I have a small question. How do I  force NH to set the default values and
> other settings for fields when creating the tables in NH (with create
> schema)
>
> best regards
>
> Tuncer Karaarslan
>
> --
> Tuncer KARAARSLAN
> 00-90-542-3960238
>
>  --
> 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