php - Can a Discriminator Column be part of the Primary Key in Doctrine2? -


I use the Doctrine2 to store OAuth credentials for many services. I want to use; However, it is not unique in all services

I have setup the database to use the discriminator column and the service ID as the primary key, but I use the discriminator column as the key to the theory Can not find (Apart from discriminating columns) I am using Dokblock annotations, and if I add column that discriminated as an @Id field then I get an error :

  Duplicate definition of the column ... field or in discrimination caller mapping  

If I define the field as only the differential column, Any overlapping service ID updates all mailing rows.

Anyway to create this task, just one price it autogenerated?

You can not use the descriminator column as part of the primary key is. / P>

Why is STI required for this use case BTW? You have to create a new category for each open-id service you provide, which is very upset: -)


Comments