How can you create Clustered Indexes with Fluent NHibernate?

后端 未结 4 758
自闭症患者
自闭症患者 2020-12-18 10:59

I am using Fluent-NHibernate (with automapping) to generate my tables but would like to choose a different clustered index than the ID field which is used by default. How ca

4条回答
  •  孤城傲影
    2020-12-18 11:36

    I can't answer that specifically, but I'll give you some database info since I'm here.

    You'll need to tell NHibernate to create the primary key at a non-clustered index. There can only be only clustered index per table, so you need to create the table as a heap, and then put a clustered index on it.

提交回复
热议问题