Hudson, the problem with that is that ideally I don't want to have to add "YourProperty" to my entity. Sort of like the Reveal.Property<T>() method, but without the property having to exist at all.
Having looked at the source now I think what I want might not currently be possible in Fluent NH. I also tried mixing in the hbm (1st time I've tried mixing). but it seems you can't mix hbm and fluent for a single entity, so I'd have to change the whole mapping to hbm for the entity. So at the moment I'm thinking that I just put in some protected properties that specify the default legacy values to use. On Feb 17, 4:12 pm, Hudson Akridge <hudson.akri...@gmail.com> wrote: > Map(x=>x.YourProperty, "ColumnName").Access.Using<YourCustomAccessorType>(); > > Alternatively, you might want to check into IUserType to see if you can get > default values going that way to a legacy DB. Although I admit, the custom > propertyaccessor seems like a much better fit for providing default values. > > > > On Wed, Feb 17, 2010 at 9:08 AM, Alex McMahon <fluxmu...@gmail.com> wrote: > > I'm working with a legacy database and am trying to isolate the messy > > stuff from my domain model. > > > I've been looking at using custom IPropertyAccessors to provide > > default values for legacy columns. The link below shows my inspiration > > for this... Can anyone tell me how to convert the hbm on the linked > > page to fluent mappings? > > >http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/ > > > -- > > You received this message because you are subscribed to the Google Groups > > "Fluent NHibernate" group. > > To post to this group, send email to fluent-nhibern...@googlegroups.com. > > To unsubscribe from this group, send email to > > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/fluent-nhibernate?hl=en. > > -- > - Hudsonhttp://www.bestguesstheory.comhttp://twitter.com/HudsonAkridge -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@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.