Given a Vehicle class and a VehicleProperty class...
public class Vehicle
{
public virtual int Id { get; protected set; }
public virtual string Regis
I agree entirely with Stefan's points, and although I can't attest to the correctness of his mapping, the literal translation into Fluent NHibernate is as follows:
public class VehicleMap : ClassMap
{
public VehicleMap()
{
Id(x => x.Id);
Map(x => x.Registration);
HasMany(x => x.Properties)
.Component(c =>
{
c.Map(x => x.Name);
c.Map(x => x.Value);
})
.Cascade.AllDeleteOrphan();
}
}