FluentNHibernate.Mapping.Builders namespace

98 views
Skip to first unread message

Matthew MacFarland

unread,
Mar 29, 2011, 4:03:59 PM3/29/11
to fluent-n...@googlegroups.com
In version 1.1.0.0 there was a namespace called but in the current download version 1.1.0.685 it is gone. Has this been replaced by some other namespace?

Thanks,

Matthew

James Gregory

unread,
Mar 30, 2011, 4:55:33 AM3/30/11
to fluent-n...@googlegroups.com
Version 1.1.0685 *is* the 1.1 release, where did you get your 1.1.0.0 version from?

Cole W

unread,
Mar 30, 2011, 7:41:03 AM3/30/11
to Fluent NHibernate
Actually James this came from an article on StackOverflow. It was me
that has the 1.1.0.0 version. I got this version from a co-worker
that I can only assume downloaded it off the Fluent site several
months back.

James Gregory

unread,
Mar 30, 2011, 7:44:47 AM3/30/11
to fluent-n...@googlegroups.com
Afaik, the only time your version number can end with a zero is if you've built it yourself locally; the last number indicates our TeamCity build number, so zero is pretty improbable.

As the change you're referring to could've happened any time in the last year, it might be easier for me if you say what you're specifically missing rather than just whether a namespace has moved. What classes are you no longer able to use?

Matthew MacFarland

unread,
Mar 30, 2011, 8:59:23 AM3/30/11
to fluent-n...@googlegroups.com
James,

I was trying to use FluentNHibernate.Mapping.Builders.CompositeElementBuilder. I can't find the Builders namespace at all. It is called out in the api documentation but does not appear to be in the current assembly.

Thanks,

Matthew

Matthew MacFarland

unread,
Mar 30, 2011, 9:05:19 AM3/30/11
to fluent-n...@googlegroups.com
I wanted try this sample code from James Kovacs in a Stackoverflow post. This where I got stuck since I can find CompositeElementBuilder.
public sealed class UserMap : ClassMap<User> {
   
public UserMap() {
       
Id(c => c.Id).GeneratedBy.HiLo("100");
       
Map(x => x.Name);
       
HasMany(x => x.Countries).Component(CountryComponentMapping.Map);
   
}
}

public sealed class CountryComponentMapping {
   
public static void Map(CompositeElementBuilder<Country> part) {
        part
.Map(x => x.CountryName);
        part
.Map(x => x.CountryAlpha2)
   
}
}

Daniel Mirapalheta

unread,
Mar 30, 2011, 9:15:00 AM3/30/11
to fluent-n...@googlegroups.com
Hello Matthew,

You should try using CompositeElementPart instead of CompositeElementBuilder, like this: "public static void Map(CompositeElementPart<Country> part)". Just take a look at the Component method signature, it receives an Action<CompositeElementPart<TChild>> as parameter.

Best regards,
Daniel Mirapalheta


2011/3/30 Matthew MacFarland <macf...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group.
To post to this group, send email to fluent-n...@googlegroups.com.
To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.

James Gregory

unread,
Mar 30, 2011, 9:53:21 AM3/30/11
to fluent-n...@googlegroups.com
Daniel is correct.

Confusingly, CompositeElementBuilder is the as-of-yet unreleased 2.0 name for CompositeElementPart; how you've managed to get a build of FNH with 2.0 class names but versioned 1.1, I don't know.
Reply all
Reply to author
Forward
0 new messages