[fluent-nhib] Re: HasMany and Not.Nullable

2009-12-29 Thread kberridge
Thanks. I just found HasMany( x => x.Children ).Component( ... ). I'll try it out! Thanks again, Kevin On Dec 29, 6:08 pm, Hudson Akridge wrote: > You're on the right track. Composite element in a collection should   > work for your needs. I don't recall off the top of my head what the   > fnh

Re: [fluent-nhib] Re: HasMany and Not.Nullable

2009-12-29 Thread Hudson Akridge
You're on the right track. Composite element in a collection should work for your needs. I don't recall off the top of my head what the fnh syntax is, but look at something like .hasmany().ascompositeelement () or something like that. (I'm on my mobile atm otherwise I'd look it up for you)

[fluent-nhib] Re: HasMany and Not.Nullable

2009-12-29 Thread kberridge
I found an article on what you suggest with doing a HasMany() with a composite element: http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/08/15/a-fluent-interface-to-nhibernate-part-3-mapping.aspx It uses a method called HasManyComponent which doesn't seem to exist in the current release

Re: [fluent-nhib] Re: HasMany and Not.Nullable

2009-12-29 Thread Hudson Akridge
Inverse is only required if it's got a bi-directional back. Inverse at this point would be the opposite of what we'd want, we want to declare the collection side to be the parent. The way a typical HasMany association works is that it's the child side that saves the reference back to the parent, s

[fluent-nhib] Re: HasMany and Not.Nullable

2009-12-29 Thread kberridge
Nope, didn't change the behavior. Thanks, Kevin On Dec 29, 2:58 pm, Eric Ridgeway wrote: > Try setting inverse on the has many mapping and see if that helps > > On Dec 29, 2009 11:54 AM, "kberridge" wrote: > > I have a simple parent child relationship where the parent class has a > collection o