Hi - I am mapping a legacy database to NH 2.0. In this process I have come across a few big entities - that is entities with around 20 to 30 simple properties and between 5 to 10 collections (bags).
To reduce the number of codelines and increase managability in the code file for these entities, I have been experimenting with mapping the collections into a "manager" class which is set up as a component in the mapping file. This manager class could then hold the business logic required to access and modify the collection of the main entity: <component name="XyzManager" class="XyzManager"> <parent name="TheParent" /> <bag name="XyzList" inverse="true" cascade="all" lazy="true"> <key column="..." /> <class name="Xyz" /> </bag> </component> The documentation for components only mentions their use for Value types and my use is more like a grouping of business logic together with the collection. What do you think? Am I off-track? Should I just chop my entity class files up with the partial keyword and group the logic like this? Any comment appreciated. Regards Thomas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
