Hi Guys,
I've just noticed that access overrides are not being applied to my
generated configuration xml
My code config looks like this
return Fluently.Configure().Database(
MsSqlCeConfiguration.Standard.ConnectionString(c
=> c.Is("data source=../../localDb.sdf"))
.ShowSql)
.Mappings(m => m.AutoMappings
.Add(AutoMap.AssemblyOf<SessionFactory>(new
WorkflowConfiguration())
.IgnoreBase<Entity>()
.Conventions.Add<CascadeConvention>()
.Override<Group>(map => map.HasMany(x =>
x.Windows).Access.ReadOnlyPropertyThroughLowerCaseField().Inverse())
.Override<Order>(map => map.HasMany(x =>
x.Groups).Access.ReadOnlyPropertyThroughLowerCaseField().Inverse())
)
.ExportTo("mapping"))
.ExposeConfiguration(RegisterValidatorEngine)
.BuildSessionFactory();
And
public class CascadeConvention : IReferenceConvention,
IHasManyConvention, IHasManyToManyConvention
{
public void Apply(IManyToOneInstance instance)
{
instance.Cascade.All();
}
public void Apply(IOneToManyCollectionInstance instance)
{
instance.Cascade.All();
}
public void Apply(IManyToManyCollectionInstance instance)
{
instance.Cascade.All();
}
}
Which is generating xml like this (as you can see inverse is applied,
but the access value doesn't seem to be)
<bag access="nosetter.lowercase" cascade="all" inverse="true"
name="Groups" mutable="true">
I noticed a few access related commits in the github changeset log, as
such I'm not sure whether or not this issue has already been fixed.
Currently I'm using fnh from NuGet, says version 1.1.0.0, but that
doesn't seem to mean much.
To digress a bit, is there any way to set SQLCE 4 dialect with fnh?
Thanks in advance,
Josh
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fluent-nhibernate?hl=en.