What exactly is the question? If you have a 1:M relation between two tables, you can map it differently.
Lets say Table A 1=>m Table B, mapped to classes A and B. - Map it as a collection (list / bag / set / map etc.) of class A - Map it as a reference (many-to-one) in class B - Map it as both, by defining the collection as inverse=true You have to decide how your class model should look like. This is actually a question of object oriented design. After you finished modeling you domain classes, you know how it needs to be mapped using NH. On 7 Aug., 08:18, Sachin <[email protected]> wrote: > If I have a relation say 1:M between two tables so is it mandatory > that I specify it in mappings of both of entities, as I have > implemented that if I specify bag/list in mapping of class in which I > require to have it specifies it and I need not specify M:1 in other > class as I do not require it in other class. > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
