Hi Steve, It looks like you've found a gap in the fluent interface. I would guess that most people deal with this by setting the corresponding many-to-one as not nullable:
(in BarMap) References(x => x.Foo) .Column("Foo_id") .Not.Nullable(); Of course I can understand that sometimes you don't want to model the relationship as bidirectional. We've known for a while now that our support for certain column properties (such as this one) is incomplete, and I do expect this will get addressed eventually. In the mean time, can you get by using my above suggestion? Paul Batum On Sat, Sep 12, 2009 at 4:58 AM, Steve Wagner <li...@lanwin.de> wrote: > > Hi, how can i map column constrains like this? > > <set name="Bars"> > <key> > <column not-null="true" name="Foo_id" /> > </key> > <one-to-many class="Bar" /> > </set> > > When i am not wrong, over HasMany(x=>x.Bars) i can only set the column > name but noting more. > > Dose i overlook something or is there currently no way to map this? > > Steve > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---