 <p>This is not supported out-of-the-box. The hint declared on the a relation is rarely used, more meant as a Foreign Key hint than a column hint. There are several options you can use to do this.</p> <p>The easiest is to use a post-generation .SQL script to add the clustered setting manually. This is described here: <a href="https://www.softfluent.com/documentation/StandardProducers_SQLServer_CustomScripts.html" rel="nofollow">How to: Execute custom T-SQL scripts with the Microsoft SQL Server producer</a>.</p> <p>You could also use the Patch Producer to remove the CLUSTERED word from the file once it has been created : <a href="https://www.softfluent.com/documentation/StandardProducers_PatchProducer.html" rel="nofollow">Patch Producer</a></p> <p>Otherwise, here is another solution that involves an aspect I've written as a sample here. You can save the following piece of XML as a file, and reference it as an aspect in your model.</p> <p>This aspect will add the CLUSTERED hint to primary keys of all Many To Many tables inferred from entities that have CLUSTERED keys. It will add the hint before the table scripts are created and ran, and will remove it after (so it won't end up in the <code>relations_add</code> script).</p> <pre><code>&lt;cf:project xmlns:cf="http://www.softfluent.com/codefluent/2005/1"&gt; &lt;!-- assembly references --&gt; &lt;?code @reference name="CodeFluent.Producers.SqlServer.dll" ?&gt; &lt;?code @reference name="CodeFluent.Runtime.Database.dll" ?&gt; &lt;!-- namespace includes --&gt; &lt;?code @namespace name="System" ?&gt; &lt;?code @namespace name="System.Collections.Generic" ?&gt; &lt;?code @namespace name="CodeFluent.Model.Code" ?&gt; &lt;?code @namespace name="CodeFluent.Model.Persistence" ?&gt; &lt;?code @namespace name="CodeFluent.Model.Code" ?&gt; &lt;!-- add global code to listen to inference steps --&gt; &lt;?code Project.StepChanging += (sender1, e1) =&gt; { if (e1.Step == ImportStep.End) // hook before production begins (end of inference pipeline) { var modifiedTables = ProjectHandler.AddClusteredHint(Project); // get sql server producer and hook on production events var sqlProducer = Project.Producers.GetProducerInstance&lt;CodeFluent.Producers.SqlServer.SqlServerProducer&gt;(); sqlProducer.Production += (sender, e) =&gt; { // determine what SQL file has been created // we want to remove hints once the table_diffs has been created, before relations_add is created string script = e.GetDictionaryValue("filetype", null); if (script == "TablesDiffsScript") { ProjectHandler.RemoveClusteredHint(modifiedTables); } }; } }; ?&gt; &lt;!-- add member code to handle inference modification --&gt; &lt;?code @member public class ProjectHandler { public static IList&lt;Table&gt; AddClusteredHint(Project project) { var list = new List&lt;Table&gt;(); foreach (var table in project.Database.Tables) { // we're only interested by tables inferred from M:M relations if (table.Relation == null || table.Relation.RelationType != RelationType.ManyToMany) continue; // check this table definition is ok for us if (table.RelationKeyColumns.Count &lt; 1 || table.RelationRelatedKeyColumns.Count &lt; 1) continue; // check clustered is declared on both sides string keyHint = GetSqlServerProducerHint(table.RelationKeyColumns[0].Property); string relatedKeyHint = GetSqlServerProducerHint(table.RelationKeyColumns[0].Property); if (keyHint.IndexOf("clustered", StringComparison.OrdinalIgnoreCase) &lt; 0 || relatedKeyHint.IndexOf("clustered", StringComparison.OrdinalIgnoreCase) &lt; 0) continue; // force hint now, we only need to do this on one of the keys, not all table.PrimaryKey.Elements[0].SetAttribute("hint", CodeFluent.Producers.SqlServer.Constants.SqlServerProducerNamespaceUri, "clustered"); // remember this table list.Add(table); } return list; } public static void RemoveClusteredHint(IEnumerable&lt;Table&gt; list) { foreach (var table in list) { table.PrimaryKey.Elements[0].RemoveAttribute("hint", CodeFluent.Producers.SqlServer.Constants.SqlServerProducerNamespaceUri); } } // helper method to read XML element's hint attribute in the SQL Server Producer namespace private static string GetSqlServerProducerHint(Node node) { if (node == null) return null; return node.GetAttributeValue&lt;string&gt;("hint", CodeFluent.Producers.SqlServer.Constants.SqlServerProducerNamespaceUri, null); } } ?&gt; &lt;/cf:project&gt; </code></pre>