views:

174

answers:

0

If I want to specify some nonclustered indices in a hibernate mapping as follows:

CREATE NONCLUSTERED INDEX [Index_name] ON [dbo].[Individual] ( [ID] ASC, [IsActive] ASC )WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

what's the best way to do it for multiple tables that aren't necessarily represented in the same mapping file? should i do all the index creation in a separate mapping file? that seems the cleanest, but it wouldn't make any sense until mapping files specifying the related tables have already been parsed.

by the same token, some of the objects are implied by existing mappings, so i don't have a one to one relationship between objects and mapping files, so it's not trivial to know in which mapping file each of these statements should go. has anyone else come up with a solution to this?