I have a component which contains a collection. I can't seem to get NHibernate to persist items in the collection if I have the collection marked as Inverse. They will persist if I don't have Inverse on the collection, but I get an insert and then an update statement.
My mapping is :
m => m.Component(x => x.Configuration, c =>
{
c.HasMany(x => x.ObjectiveTitleTemplates)
.Access.ReadOnlyPropertyThroughCamelCaseField(Prefix.Underscore)
.AsSet()
//.Inverse()
.KeyColumns.Add("ObjectiveProcessInstanceId")
.Cascade.AllDeleteOrphan();
});
Is there a way to get it working marking the collection as Inverse and therefore avoiding the extra insert?
Thanks!