Hi List,
what i have:
public class Address : BaseDomain<Address>
BaseDomain<T> contains the Id and stuff like this.

public class AdressMapping:ClassMap<Address>
{
.....
}


public class CustomerMapping :
BaseClassMap<ProjectTracker.Domains.Customer>
{
......
   References(x => x.HomeAddress).Not.LazyLoad().Cascade.SaveUpdate();
-> Use Address
   References(x =>
x.BillingAddress).Not.LazyLoad().Cascade.SaveUpdate(); -> Use Address
}

public sealed class ProjectsMapping: BaseClassMap<Project>
{
....
  References(x =>
x.ProjectAddress).Not.LazyLoad().Cascade.SaveUpdate(); -> Use Address
}

This Entity's (Customer and Project, actually there are more Entity's
references Address) references all one AddressTable, so i have
addresses from allover my Domain inside the AddressTable.

a) What did you think about this DB-Design

b) is there any chance to map as follows:
use Address as BaseClass for all Addresses.

Create Mapping for
Project -> ProjectAddresses
Customer -> CustomerAdresses and so on.
But, always use the AddressEntity as BaseClass for all XYAddresses.

Thanks
Peter



-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en.

Reply via email to