I'm trying to map a many-to-many collection with Fluent NHibnernate. My model class has this property:
public virtual IList Screenshots { get { return _screenshots; } protected set { _screenshots = value; } }
And my fluent mapping is: HasManyToMany(x => x.Screenshots) .AsList(x => x.WithColumn("Index")) .Cascade.AllDeleteOrphan();
When I run my application, I get the following exception message: The element 'list' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'many-to-many' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'index, list-index' in namespace 'urn:nhibernate-mapping-2.2'.
There should be a way to do this. Does anyone know what I am doing wrong?