I'm actually pretty surprised to hear that.  If it doesn't guarantee any 
order, why is it trying to reorder them at all then?

A manual migration isn't going to help me here... I don't want to change 
anything, I want to prevent doctrine from thinking it needs to change 
something.


On Wednesday, November 28, 2018 at 9:40:59 AM UTC-8, Marco Pivetta wrote:
>
> I'd avoid YML mappings overall, since they are deprecated and removed from 
> ORM `master`.
>
> Still, order of columns in a key is not guaranteed anywhere in the ORM, so 
> there's no real way to enforce the DDL to match your requirements. Consider 
> using manually crafted doctrine migrations instead.
>
> On Wed, 28 Nov 2018, 18:09 James Moser <[email protected] <javascript:> 
> wrote:
>
>> I'm having problems setting a field order in a composite primary key.  It 
>> seems doctrine is prioritizing the scalar type over the association keys?
>>
>>     id:
>>         first:
>>             associationKey: true
>>         second:
>>             associationKey: true
>>         third:
>>             type: string
>>             nullable: false
>>             length: 2
>>             options:
>>                 fixed: false
>>                 default: A
>>             id: true
>>             column: third
>>
>> It produces:
>>  
>>     PRIMARY KEY (third, first, second)
>>
>> when I need it to match the existing table, which has:
>>
>>     PRIMARY KEY (first, second, third)
>>
>> I can't find anything about ordering the fields in a composite key in the 
>> docs.  Is this normally done through the order listed in YML?
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://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 https://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to