This works.
t.Map(x => x.DateTime).ColumnNames.Add("CRDATE", "CRTIME").SetAttribute
("type", typeof(ERPDateTime).AssemblyQualifiedName);
Thanks.
On Jun 9, 11:35 am, Eyston <[email protected]> wrote:
> Hello,
>
> I'm trying to map this as a component:
>
> class TransactionStamp
> {
> public DateTime DateTime {get; set;}
> public string UserName {get; set;}
>
> }
>
> DateTime is a composite user type ERPDateTime which has a Date and
> Time column.
>
> Component(m => m.Create, t =>
> {
> t.Map(x => x.DateTime).CustomTypeIs< ERPDateTime>().ColumnNames.Add
> ("CRDATE", "CRTIME");
> t.Map(x => x.UserName, "CRUSER").CustomTypeIs<TrimmedString>();
>
> });
>
> The outcome is:
>
> <component name="Create" insert="true" update="true">
> <property name="DateTime"
> type="Aero.Serials.Issue.Types.AS400DateTime, Aero.Serials.Issue,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
> <column name="Date" />
> <column name="Time" />
> <column name="CRDATE" />
> <column name="CRTIME" />
> </property>
> <property name="UserName"
> type="Aero.Serials.Issue.Types.TrimmedString, Aero.Serials.Issue,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
> <column name="CRUSER" />
> </property>
> </component>
>
> Is there a way to stop the Date and Time column from being added?
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---