Skip to content

Fix identifier generator strategy for composite identifier#342

Closed
jeanmonod wants to merge 1 commit intodoctrine:masterfrom
jeanmonod:master
Closed

Fix identifier generator strategy for composite identifier#342
jeanmonod wants to merge 1 commit intodoctrine:masterfrom
jeanmonod:master

Conversation

@jeanmonod
Copy link

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
Copy link
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
Copy link
Author

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
Copy link
Member

stof commented May 5, 2012

@jeanmonod CS means Coding Standards

@beberlei beberlei closed this in 04b23db May 27, 2012
simensen pushed a commit to simensen/doctrine2 that referenced this pull request Jun 27, 2012
@odoucet
Copy link

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
Copy link
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants