HasMany and property-ref for FNH 1.0

Ross Beehler's Avatar

Ross Beehler

18 May, 2010 02:25 PM via web

I see that issue 207 tried to support the property-ref attribute via HasMany (http://code.google.com/p/fluent-nhibernate/issues/detail?id=207), but the API of the latest RTM version of Fluent NHibernate doesn't match the proposed fix. Any suggestions as to how to set the property-ref with FNH 1.0?

  1. Support Staff 2 Posted by James Gregory on 18 May, 2010 02:29 PM

    James Gregory's Avatar

    It did add support, but after the RTM. You should use the latest binary from
    the site. We're about to hit 1.1 in a few days, so you won't be off stable
    release for long.

  2. 3 Posted by Ross Beehler on 18 May, 2010 03:24 PM

    Ross Beehler's Avatar

    Works great:

            HasMany(x => x.Fields)
                .KeyColumns.Add("IMPORTSET_ID")
                .PropertyRef("ImportSetId")
                .Cascade.Delete()
                .Inverse();
    

    Thanks.

  3. James Gregory closed this discussion on 19 May, 2010 01:55 AM.

Comments are currently closed for this discussion. You can start a new one.