private HbmMapping GetMappingWithParentInCompo() { var mapper = new ConventionModelMapper(); mapper.Class <MyClass>(x => { x.Id(c => c.Id); x.Component(c => c.Compo); x.Bag(c => c.Compos, cm => { }); }); mapper.Component <MyCompo>(x => { x.Parent(c => c.Parent); x.Component(c => c.NestedCompo); }); mapper.Component <MyNestedCompo>(x => { x.Component(c => c.Owner); x.Property(c => c.Something); }); return(mapper.CompileMappingForAllExplicitlyAddedEntities()); }