public class MyClassMap : ClassMap<MyClass>
{
  public MyClassMap()
  {
    ...
    Component(x => x.MyComponent).ColumnPrefix("timeZone");
  }
}

On Mon, Aug 13, 2012 at 9:29 PM, gleb Chermennov
<thebitteren...@gmail.com>wrote:

> Ok, I know the title is not a proper English at all, so let me just show
> the code that I have.
>     public class SomeEntity
>     {
>         public virtual int Id { get; protected set; }
>         public virtual ZonedDateTime DateTime
>         {
>             get { return new ZonedDateTime(new
> Instant(timeZone.InstantTicks), DateTimeZone.ForId(timeZone.ZoneId)); }
>         }
>         public virtual string Name { get; set; }
>         private Zone timeZone;
>     }
>
>     public class SomeEntityMap: ClassMap<SomeEntity>
>     {
>         public SomeEntityMap()
>         {
>             Id(x => x.Id);
>             Component(Reveal.Member<SomeEntity, Zone>("timeZone");
>             Map(x => x.Name);
>         }
>     }
>
>     public class Zone
>     {
>         public long InstantTicks { get; set; }
>         public string ZoneId { get; set; }
>     }
>
>     public class ZoneMap: ComponentMap<Zone>
>     {
>         public ZoneMap()
>         {
>             Map(z => z.InstantTicks).Not.Nullable();
>             Map(z => z.ZoneId).Not.Nullable().Length(100);
>         }
>     }
> I'd like to map every property of Zone class to a column prefixed by
> member name, in this case "timeZoneInstantTicks" and "timeZoneZoneId". Is
> this scenario supported in Fluent NHibernate, because I haven't find a way
> to do it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/fluent-nhibernate/-/Lm8V0SaBU3EJ.
> To post to this group, send email to fluent-nhibernate@googlegroups.com.
> To unsubscribe from this group, send email to
> fluent-nhibernate+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to