title: Setting foreign key constraint name convention for all relationship types using Fluent Nhibernate
body: <pre><code>public class ReferenceConvention : IReferenceConvention{
   public void Apply(IManyToOneInstance instance) {
        instance.ForeignKey(string.Format("FK_{0}_{1}",
             instance.EntityType.Name,
             instance.Name));
   }
  </code></pre>
  
  <p>}</p>
  
  <p>The above code allows me to change the naming convention for foreign key relationships in the case of the type References. How can I achieve the same result for IHasManyConvention name and IHasManyToManyConvention. The change of name convention for IReferenceConvention worked perfectly displayed the way, but I'm not getting to the other types of relationships.</p>