Using nHibernate to map two different data models to one entity model
- by Dan
I have two different data models that map to the same Car entity. I needed to create a second entity called ParkedCar, which is identical to Car (and therefore inherits from it) in order to stop nhibernate complaining that two mappings exists for the same entity.
public class Car
{
protected Car()
{
IsParked = false;
}
…