I am using Fluent NHibernate / NHibernate to auto-generate my database
schema. I want to set the clustered index to be something other than
the primary key.

I have come researched everywhere I can think of but still have not
come up with a way to define a specific column on which to cluster.

By default, NHibernate makes the primary key clustered, but this is
ineffecient when the primary key is of type Guid. I would like to set
use my CreatedOn columns in my tables as the clustered indexes since
this would allow all new records to be appended rather than inserted.
(Remember, by defaut Guids are not sequential, and I prefer not to use
sequential guids.)

Does anyone know what mechanism (preferably a convention) can be
employed to configure the clustered index to be something other than
the primary key? Even if I had to do some configuration through
NHibernate, that would be fine. What I am trying to avoid is writing a
separate sql script to drop and re-create the clustered indexes. I
would prefer for all of my data layer interactions to be handled
solely through NH.

Any suggestions are much appreciated.

Thanks!

Anthony




On Aug 31, 3:24 am, Anthony Gatlin <[email protected]> wrote:
> Is there a way to define which column have be a clustered index in
> Fluent-NHibernate?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to