Q:

Modifying database structure with inherited mappings in Fluent NHibernate

I have three objects A, B and City, where B inherits A.
A contains the ID and the Name of this structure. 
internal class AMap : ClassMap<A>
{
    internal AMap()
    {
        Id(x => x.ID).GeneratedBy. Assigned().Not. Nullable();
        Map(x => x.Name).Length(255);
        Table("A");
    }
}

B should be an extension object which contains a list of City objects
internal class BMap : SubclassMap<B>
{
    internal BMap()
    {
        HasManyToMany(x => x.Cities).Not. LazyLoad().AsBag().Table("B").Cascade. All();
    }
}

This should result in the following database structure
Table A:
    -  ID
    -  Name
Table B:
   -  ID_A
   -  ID_City
It should be a ManyToMany relationship, so ID_A and ID_City can occur multiple times in Table B
How can I realize this structure in the Fluent NHibernate mapping? 
Thanks,
Xeno

A:

I was able to solve this, so this is the result of a bad headache:
internal class AMap : ClassMap<A>
{
    internal AMap()
    {
        Id(x => x.ID).GeneratedBy. Assigned().Not. Nullable();
        Map(x => x.Name).Length(255);

        Map(x => x.Type).Column("ObjType");
        DiscriminateSubClassesOnColumn(@"Type");

        Table("A");
    }
}

internal class BMap : SubclassMap<B>
{
    internal BMap()
    {
        HasManyToMany(x => x.Cities).Not. LazyLoad().AsBag().Table("B").Cascade. All();
    }
}

I have added a Type field, which identifies each subclass, then the DiscriminateSubClassesOnColumn stores the Type-Information of an object in the A-Table. 
The B-Table doesn't exist anymore, but there is a mapping table for each object of Type B to it's City-Objects

