Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate table indexes using Fluent NHibernate

Is it possible to generate table indexes along with the rest of the database schema with Fluent NHibernate? I would like to be able to generate the complete database DDL via an automated build process.

like image 496
Todd Brooks Avatar asked Sep 10 '25 07:09

Todd Brooks


1 Answers

In more recent versions of Fluent NHibernate, you can call the Index() method to do this rather than using SetAttribute (which no longer exists):

Map(x => x.Prop1).Index("idx__Prop1");
like image 128
Paul Batum Avatar answered Sep 13 '25 05:09

Paul Batum