I have 3 DB Tables: Person, Address, and PersonAddress. Person Address is a simple join table (only stores the IDs of Person and Address).
In my domain model, I have Person and Address. Person is configured to have a many-to-many relationship to Address (through PersonAddress). In code, this is implemented with List<Address>
.
I've been told that I will get better performance from nHibernate if I...
- Create a PersonAddress domain object
- Configure Person to have a one-to-many relationship to PersonAddress
- Configure a a many-to-many index for Address on this relationship
- Implement it in code with a
Dictionary<Address, PersonAddress>
Is this true?