Skip to content

Conversation

@birdy247
Copy link

Adds support for duplicating tables with composite keys

'append' => [],
'saveOptions' => []
'saveOptions' => [],
'preserveKeyFromCompositeKey' => ''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this this a string, what if composite key consistents of 3 fields and 2 need to be removed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

{
if (is_array($object->getPrimaryKey())) {

$compositeKey = $object->getPrimaryKey();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this assignment the first statement (with name $primaryKey) and avoid calling method again.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

*
* @param EntityInterface $entity
* @param $object
* @throws \Exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return void missing maybe here?

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.

3 participants