I have the following class with a Dictionary :
public class Entity1
{
public Dictionary<Entity2,Entity3> Targets { get; set; }
}
Mapped currently by this code :
Map(x => x.Targets,
m => m.Key(k => k.Column("Entity1ID")),
km => km.ManyToMany(mtm => mtm.Column("Entity2ID")),
vm => vm.ManyToMany(mtm => mtm.Column("Entity3ID")));
I am looking for a way to set different cascade option to the KeyMapping, and a different one to the ValueMapping. But i can find cascade only in the main "Collection Mapping"
I want the key to have Cascade.None - because a different part of the application manages that entity, and the Value to have Cascade.AllDeleteOrphan.
How can i do that with MbC ?
plus - if i set the "CollectionMapping"'s Cascade - to what Entity does it reflect?
I am using the latest Nhibernate on nuget.