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] 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]. > 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. > -- 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.
