Please use the NHibernate mailing list http://groups.google.com/group/nhusers
On Wed, Sep 2, 2009 at 1:07 AM, nyankov <[email protected]> wrote: > > Hi Everyone, > > I need help in following. > > Let's consider we have classes Photo, Video, Post, and each of this > classes implements ICommentable. > > public interface ICommentable{ > IList<Comment> Comments { get; set; } > } > > > public class Comment{ > > public ICommentable Target { get; set; } > } > > My question is how should I map this situation. ManyToOne and > OneToMany seems not work here because Photo, Video, Post are different > classes and in Comment table should be able some how to mention which > is target. > > Any help will be much appriciated. > > Thanks. >
