Depending on how sane some of your columns are, you might get away with some shortcuts, but the surefire way to deal with this is to use IUserType. Google for IUserType for more info on the feature itself. I think the syntax in FNH is something like CustomType<YourCustomTypeHere>().
On Fri, Mar 12, 2010 at 4:26 AM, Dathan Bennett <dat...@gmail.com> wrote: > I'm working with a legacy schema that has several fields that are intended > to represent true/false, but aren't bit fields, and don't use 1/0. Instead, > they're integer fields and use 1/2 for true/false, respectively. If, for > instance, I have such a field called Confirmed on a table in the database, > and want to map it to a bool field named Confirmed on my model object, how > would I accomplish this? > > Thanks! > > ~Dathan > > public class Reservation : Record > { > public virtual bool Confirmed { get; set; } > } > > public class ReservationMapping : SubclassMap<Reservation> > { > public ArsonEventMapping() > { > Not.LazyLoad(); > Table("ReservationsTbl"); > KeyColumn("ReservationID"); > > // What goes here? > Map(x=>x.Confirmed).Column("Confirmed"); > } > } > > -- > 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. > -- 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.