Hi - I have general question regarding the mapping of tables to the domain model with NHibernate.
I am working on a project where we have mapped approx 200 tabels to domain objects, where all the foregin-keys in the database has been turned into associations on the domain objects, typically using <bags> and <many-to-one>. The domain model is being used from a web application. What we are experiencing now is that whenever we need to traverse more than two levels of associations, we usually end up having 10+ selects against the database. I understand the reasons for this and some of the workarounds. On one side, its really nice to be able to traverse your domain model using NHibernate managed associations, on the other hand, you do not want to overload the database with too many selects. Some of the ideas that I have been considering: 1) Use lazy-load/proxies on some of the <many-to-one> references to avoid having too many joins in the resulting SQL. 2) Reduce the number of associations in the NHibernate mapping files, and only use NH associations with a smaller set (related) of domain objects. I would really like to now how you are dealing this issue. Kind 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 -~----------~----~----~----~------~----~------~--~---
