Hi folks,
I have a question.
This is my entity:
[Serializable]
[EnableClientAccess]
public class RegistroAccesos
{
public RegistroAccesos() { }
[Key]
public virtual Int32 Id { get; set; }
public virtual Sistema.NombresAplicaciones CodigoAplicacion
{ get; set; }
public virtual string Fecha { get; set; }
public virtual string Hora { get; set; }
public virtual string CodigoUsuario { get; set; }
public virtual string ContraseñaActual { get; set; }
public virtual string ContraseñaAnterior { get; set; }
public virtual eRegistroAccesos_ControlAccesos ControlAcceso
{ get; set; }
public virtual eRegistroAccesos_ControlContraseñas
ControlContraseña { get; set; }
public virtual string Ip { get; set; }
public virtual string Ius { get; set; }
public virtual string Informacion1 { get; set; }
public virtual string Informacion2 { get; set; }
}
An this is my mapping:
public sealed class RegistroAccesosMapping :
ClassMap<RegistroAccesos>
{
public RegistroAccesosMapping()
{
Table("LOGREGISTROACCESOS");
Map(x => x.Id).Column("LRA_ID") .Not.Nullable();
Map(x =>
x.CodigoAplicacion).Column("LRA_APLIC").Not.Nullable();
Map(x =>
x.Fecha).Column("LRA_FECHA").Length(8).Not.Nullable();
Map(x =>
x.Hora).Column("LRA_HORA").Length(6).Not.Nullable();
Map(x =>
x.CodigoUsuario).Column("LRA_NUSU").Length(8).Not.Nullable();
Map(x =>
x.ContraseñaActual).Column("LRA_PAAC").Length(255).Not.Nullable();
Map(x =>
x.ContraseñaAnterior).Column("LRA_PAAN").Length(255).Not.Nullable();
Map(x =>
x.ContraseñaAnterior).Column("LRA_PAAN").Length(255).Not.Nullable();
Map(x =>
x.ControlAcceso).Column("LRA_COACC").Not.Nullable();
Map(x =>
x.ControlContraseña).Column("LRA_COCON").Not.Nullable();
Map(x =>
x.Ip).Column("LRA_REMIP").Length(50).Not.Nullable();
Map(x =>
x.Informacion1).Column("LRA_INF1").Length(2000).Not.Nullable();
Map(x =>
x.Informacion2).Column("LRA_INF2").Length(2000).Not.Nullable();
}
}
I'm logging with log4net and INSERT operation. This is the result:
NHibernate.SQL: 13:01:05,592 DEBUG SQL:0 - INSERT INTO
[RegistroAccesos] (CodigoAplicacion, Fecha, Hora, CodigoUsuario,
ContraseñaActual, ContraseñaAnterior, ControlAcceso,
ControlContraseña, Ip, Ius, Informacion1, Informacion2) VALUES (@p0,
@p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11); select
SCOPE_IDENTITY();@p0 = 'PlanosNET' [Type: String (255)], @p1 =
'20110826' [Type: String (4000)], @p2 = '130046' [Type: String
(4000)], @p3 = 'USUARIO' [Type: String (4000)], @p4 =
'218075146055186204205241156007096202183174196168053144016176' [Type:
String (4000)], @p5 = '' [Type: String (4000)], @p6 =
'Autorizado' [Type: String (255)], @p7 = 'SinAsignar' [Type: String
(255)], @p8 = '::1' [Type: String (4000)], @p9 =
'20110826130046995' [Type: String (4000)], @p10 = NULL [Type: String
(4000)], @p11 = NULL [Type: String (4000)]
Questions are:
1. Why table is using entity name instead of
Table("LOGREGISTROACCESOS");?
2. Why some params are not reading .Lenght method?
2. Why all params are not reading .Column method?
If you need further information I will send you in pleasure.
Cheers.
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" 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/fluent-nhibernate?hl=en.