Hi!
I am using ConfORM in my new project at work, it's really a joy.
It is the request of the customer to name all foreign keys, so I have a thing like this:
public class MyManyToManyApplier : IPatternApplier<MemberInfo, NHibernate.Mapping.ByCode.IManyToManyMapper>
{
public void Apply(MemberInfo subject, NHibernate.Mapping.ByCode.IManyToManyMapper applyTo)
{
var linkedTo = subject.GetPropertyOrFieldType().GetGenericArguments().First().Name;
var fkName = "FK_" + subject.DeclaringType.Name + "_To_" + linkedTo + "_" + subject.Name;
applyTo.ForeignKey(fkName);
}
public bool Match(MemberInfo subject)
{
return true;
}
}
But, how can I name the m2m intermediate tables? Is this even possible in NH? Without adding class mappings for them?
Thanks for your answers and thanks to Fabio for his great work.
Sincerely,
Alex