A Dictionary<key, IList<value>> is not supported in NHibernate I believe. At least I don't know of any way to map that. What you'd have to do is what you describe in the second point, which is to have an entity which encompasses the IList<value>, and then map that as another IList<Entity> from your Post class.
What is the additional bit of data you're trying to store, at the moment, it looks like you could resolve your solution without needing the many-to-many table. Since it's a self join, the Post class itself could hold all of the Many-To-Many information you needed. Something like this: class Post { public Post Parent {get;set;} public IList<Post> Children {get;set;} } class PostMap { ctor { Reference(x=>x.Parent, "ParentPostId").Cascade.SaveUpdate(); HasMany(x=>x.Children, "ParentPostId").Cascade.AllDeleteOrphan().Inverse() } } Something like that. But perhaps I'm missing a requirement somewhere for your domain. On Sun, Feb 14, 2010 at 5:02 AM, Dave <davidm...@gmail.com> wrote: > Hi, > > I asked a question over on stackoverflow, that has received no > answers, I wonder if anyone on this list could give me any suggestions > on how to achieve what im trying to do? > > > http://stackoverflow.com/questions/2243251/fluent-nhibernate-mapping-problem-many-to-many-self-join-with-additional-data > > I have added a link rather than post the question as I suspect my > supeer-cool ascii diagram would lose its shape! > > -- > 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. > > -- - Hudson http://www.bestguesstheory.com http://twitter.com/HudsonAkridge -- 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.