Here is interesting post about collections mapping (one-to-many/many- to-one and many-to-many)
http://marekblotny.blogspot.com/2009/02/fluent-nhbernate-and-collections.html -- Cheers, Marek On 6 Lut, 14:34, Levin <[email protected]> wrote: > Thanks, > it's a little surprised to me that we can use HasManyToMany,i throught > before we should use HasMany instead,because Post and Comment have the > One-To-Many relationship. > > On Feb 6, 8:18 pm, James Gregory <[email protected]> wrote: > > > You want a HasManyToMany from posts to comments, and a second one from > > products to comments. Use WithTableName to set the table name of the join > > table, if needed; I believe it'll default to PostToComment, rather than > > PostComment. > > > On Fri, Feb 6, 2009 at 9:01 AM, Levin <[email protected]> wrote: > > > > Hi, > > > I have there tables, > > > > 1,Posts(Id,Title,Content) > > > ----------------------------------- > > > 2,Products(Id,Title,Desc) > > > -------------------------------------- > > > 3,Comments(Id,Title,Content,Author) > > > ---------------------------------------------------- > > > 4,PostComment(PostID,CommentID) > > > ---------------------------------------------------- > > > 5,ProductComment(ProductID,CommentID) > > > > Here Comment is independant from Post and Product,how to map this > > > situation? > > > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
