If I have a Users table and an Addresses table with a one-to-many
relation between them (one user can have many addresses), what's the
best way to handle mapping a "NumAddresses" column to the Users table
for denormalization purposes?
Right now my code is basically handling this manually:
public virtual void AddAddress(Address address)
{
this.Addresses.Add(address);
this.NumAddresses++;
}
However, I was wondering if NHibernate had some sort of built-in
mechanism for handling this.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---