This looks like an 'any' relationship to me. If so, our automapper won't detect these, but you should be able to provide an automapping override that specifies the 'any'.
http://wiki.fluentnhibernate.org/Fluent_mapping#Any <http://wiki.fluentnhibernate.org/Fluent_mapping#Any> On Wed, Mar 16, 2011 at 9:23 AM, David <sig...@gmail.com> wrote: > I am trying to implement a simple "tags" model like the one suggested > to me in a thread on nhusers (http://groups.google.com/group/nhusers/ > msg/5b7923d98c7650bd). Thus far I have relied solely on the > automappings that Fluent NHibernate produces. > > The reason I want to do this is so that multiple different types of > object can be tagged or annotated with a note, without having to make > intermediate tables/classes for everything. > > Very simply, my domain models look like: > > public interface ITaggable > { > IEnumerable<Tag> Tags { get; } > } > > public class Tag : Entity > { > ... > public virtual string Name { get; set; } > public virtual ITaggable Tagged { get; internal set; } > } > > public class MyObject : Entity, ITaggable > { > // Constructor initialises the set, add/remove methods allow the > tagging > private ISet<Tag> tags; > public virtual IEnumerable<Tag> Tags { get { return tags; } } > } > > When I try to run this up I get the error "An association from the > table Tags refers to an unmapped class: > MyApp.Core.Interfaces.ITaggable". > > Is there any way to map this automatically, or at all? I notice a > thread from 2009 now that I have received this error (http:// > groups.google.com/group/fluent-nhibernate/browse_thread/thread/ > b0d80c28725057c6) and wonder if that is still the case. > > -- > 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. > > -- 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.