Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix hydration after fetch join on entity with composite primary key#5975

Closed
kamazee wants to merge 3 commits into
doctrine:masterfrom
kamazee:fix_hydrating_fetch_join_with_composite_pk
Closed

Fix hydration after fetch join on entity with composite primary key#5975
kamazee wants to merge 3 commits into
doctrine:masterfrom
kamazee:fix_hydrating_fetch_join_with_composite_pk

Conversation

@kamazee
Copy link
Copy Markdown
Contributor

@kamazee kamazee commented Aug 14, 2016

This is a takeover of @jakestay's #5776 (fixes #5762).

Looks like the PR that has been taken over failed to pass the tests because of an intermittent CI issue, as it happens sometimes and got abandoned for that reason. It perfectly covers the issue I've stumbled upon recently so I'd like to bring it back and hope that this time Travis will behave :-)

Cherry picked on top of the current master.

@kamazee
Copy link
Copy Markdown
Contributor Author

kamazee commented Aug 14, 2016

Yeah, this time Travis approves it.

Would be cool if it makes it to 2.5.5 (I'll be happy to create another pull request for 2.5 as soon as this one is officially good enough).

parent::setup();

$this->_schemaTool->createSchema(array(
$this->_em->getClassMetadata(__NAMESPACE__ . '\GH5762Driver'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could use ::class constant for all of these classes now, since the minor PHP version currently allowed is 5.6.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. Doctrine was stuck with 5.4 in my mind but looks like it's time to finally embrace the good things, isn't it?

@kamazee
Copy link
Copy Markdown
Contributor Author

kamazee commented Aug 29, 2016

Also, recalling a feedback from @Ocramius on one of the old PRs of mine, I removed accessors and made all the things simply public to increase signal/noise ratio.

@Ocramius Ocramius added this to the 2.5.5 milestone Sep 7, 2016
@Ocramius Ocramius added the Bug label Sep 7, 2016
$rowData = $this->gatherRowData($row, $id, $nonemptyComponents);

// reset result pointers for each data row
$this->resultPointers = array();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note to self: short arrays

@Ocramius Ocramius self-assigned this Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
@Ocramius Ocramius closed this in 2814d6e Sep 7, 2016
@Ocramius
Copy link
Copy Markdown
Member

Ocramius commented Sep 7, 2016

@kamazee @jakestay merged, thanks!

master: 2814d6e
2.5: a2c23fb

@kamazee
Copy link
Copy Markdown
Contributor Author

kamazee commented Sep 8, 2016

@Ocramius does 2.5 allow ::class which is available since PHP 5.5 only? composer.json requires >=5.4 for 2.5. This is why I made the change in a separate commit :-)

@Ocramius
Copy link
Copy Markdown
Member

Ocramius commented Sep 8, 2016

@kamazee ah yes, I'll probably have to revert some changes then :-\

alexgurrola pushed a commit to Sitetheory-Archive/doctrine2 that referenced this pull request Apr 13, 2017
alexgurrola pushed a commit to Sitetheory-Archive/doctrine2 that referenced this pull request Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fetch join using composite key on join entity fails to hydrate correctly

4 participants