Hi Nima, thanks for your thoughts.

 

Actually Doctrine does try to delete every single index and foreign key I’ve 
defined and replace them with their hash-named counterparts.

Most of the indexes and foreign keys it tries to replace are indeed the same, 
with different names, and I could just accept that indeed.

 

However it also seems to ignore the fact that sometimes, instead of having a 
simple index on a column, I want to use a composite index where the first 
column will be used as an index for the foreign key, but the combination of 
this column and other ones also form a unique index that represents a 
constraint in my domain, that’s not directly representable in Doctrine.

 

I basically have a single index serve multiple purposes, whereas Doctrine seems 
to enforce 1 index ó 1 foreign key and that’s it.

 

All in all, letting Doctrine manage my indexes in particular would be quite an 
inconvenience for me, hence my question!

 

Ben

 

From: [email protected] [mailto:[email protected]] On 
Behalf Of Nima Sadjadi
Sent: 30 December 2014 13:20
To: [email protected]
Subject: Re: [doctrine-user] Custom index / foreign key names?

 

If in your SQL console, you set FK as index manually, doctrine won't generate 
such hashed names and you can have index names in your entity files as they 
are. But for constraint keys you don't need to customize them.

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "doctrine-user" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/doctrine-user/xgtklOuok0A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to