Fix identifier generator strategy for composite identifier #342

Closed
wants to merge 1 commit into
from

Projects

None yet

5 participants

@jeanmonod

When using the ConvertMappingCommand on a schema that contain a table with a composite key, we got the exception:

Single id is not allowed on composite primary key in entity CollectionFields

This can be fix by setting the identifier strategy to NONE for composite identifier fields

@asm89
Member
asm89 commented May 4, 2012

Hm, apart from the CS issues in your code, I'm wondering if setting the identifier strategy to NONE is the appropriate solution here.

ping @beberlei @guilhermeblanco

@jeanmonod

I'm not sure if it's there is an other appropriate strategy available. But I think that with composite identifiers, it can't be an automatic strategy? Isn't it?
BTW, what mean "CS issues"?

@stof
Member
stof commented May 5, 2012

@jeanmonod CS means Coding Standards

@beberlei beberlei closed this in 04b23db May 27, 2012
@simensen simensen pushed a commit to simensen/doctrine2 that referenced this pull request Jun 27, 2012
@beberlei beberlei [DDC-1798] Exporter generate error when composite primary key is gene…
…rated. Fixes GH-342
627a5a4
@odoucet
odoucet commented Jul 27, 2012

Maybe this patch needs to be ported on XmlExporter.php as well ? Because bug [DDC-1798] is also affecting XML exporter.

@stof
Member
stof commented Jul 27, 2012

@odoucet please send a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment