Creating indexes from EOModeler?
Creating indexes from EOModeler?
- Subject: Creating indexes from EOModeler?
- From: Ian Joyner <email@hidden>
- Date: Wed, 1 Feb 2006 17:07:52 +1100
This appears to be a hit and miss affair. When generating SQL in
EOModeler, if you select "Primary Key Constraints", EOModeler generates:
create unique index T pk;
(quite frequently then clobbering it with create index T pk;
getting rid of the extra benefit of a unique index)
However, what I want to do is to get it to realise there is a
relationship from this table to a foreign key in another table:
create index F fk;
I have seen it do this in one of the example databases on a to-one
relationship, but I want the index on to-many relationships. Checking
"Foreign Key Constraints" seems to do nothing – what is it supposed
to do?
It seems right that there should not be explicit setting of indexes
in EOModeler, but how do I get it to use the heuristics that are
implied by the relationships?
"Using EOModeler" says: "The source key or foreign key should emulate
the destination key in that the data types must be the same and the
names should be similar."
but I don't think the rule is that the names have to be the same.
If the answer is to write some tailored SQL to insert indexes, could
someone confirm this?
(Oh and searching the mailing list for foreign key and index returns
a whole lot of bogus hits, because every mail has the word "index" in
it!)
Thanks
Ian Joyner
Sportstec _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden