discriminator column index

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
mindplay
Posts: 148
Joined: Tue 13 Dec 2011 22:58
Location: Ithaca, NY

discriminator column index

Post by mindplay » Wed 25 Jan 2012 16:54

In the Column Editor, I can specify an Index Name - but this seems to have no effect on the generated schema?

Specifically, I have a discriminator-column on a table-per-hierarchy inheritance - and I'm trying to improve performance of searches for a particular sub-type, by adding an index to the discriminator column.

I've also attempted to configure a simple index on a "Created" DateTime column, but that seems to have no effect either...

Am I missing something, or how do you configure indexes?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 27 Jan 2012 09:14

mindplay wrote:In the Column Editor, I can specify an Index Name - but this seems to have no effect on the generated schema?
Do you want the statements for creating indexes be generated in the script when using Generate Database Script From Model if Index Name is set for the corresponding column?

At the moment NHibernate runtime uses index which is already created in the database and is specified in Index Name.

mindplay
Posts: 148
Joined: Tue 13 Dec 2011 22:58
Location: Ithaca, NY

Post by mindplay » Fri 27 Jan 2012 15:07

The idea is to create and maintain the database schema from within ED, rather than having to build and maintain it by hand, right?

Indexes are just another aspect of the database schema.

So yes, I was expecting that indexes would be generated and updated (added/removed) the same way table and column migrations are performed with the "update database" tool.

Is there a reason why I would want to maintain this by hand? (and don't take that question the wrong way - I think there might well be a reason why somebody would want to do this by hand, but I can't think of a reason myself...)

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 30 Jan 2012 17:49

Thank you for your suggestion. We will investigate the issue and post here about the results.

Post Reply