8000 issue #6470 by shustrik · Pull Request #6473 · doctrine/orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

issue #6470 #6473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

issue #6470 #6473

wants to merge 1 commit into from

Conversation

shustrik
Copy link
Contributor

Tests for issue #6470

@shustrik shustrik changed the title issue #6470 WIP issue #6470 May 26, 2017
@shustrik shustrik changed the title WIP issue #6470 issue #6470 May 26, 2017

$this->assertTrue($this->_em->getCache()->containsEntity(DDC6470User::class, ['id' => $driver1->getUserProfile()->getId()]));
$queryCount = $this->getCurrentQueryCount();
$driver3 = $this->_em->createQueryBuilder()
Copy link
Member

Choose a reason for hiding this comment

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

@shustrik the problem with this test is that your query is not cacheable, therefore it won't load data from L2C.

Your test pass if you call QueryBuilder#setCacheable(true) or if you just use $driver3 = $this->_em->find(DDC6470Driver::class, $driver1->getId()); here.

@lcobucci
Copy link
Member
lcobucci commented Sep 2, 2017

@shustrik sorry about my delay to get back to you. As mentioned on the comment this is an invalid scenario and I'll be closing the PR as invalid.

@lcobucci lcobucci self-assigned this Sep 2, 2017
@lcobucci lcobucci closed this Sep 2, 2017
@wtorsi
Copy link
wtorsi commented Mar 21, 2018

I've created pull request #7149 , but actually it's not my problem, it's just a small bug in the 'warmup' state.

In my case, some of the OneToOne relations are not put into cache properly in 'warmup' state.
After executing query some of the OneToOne fields are not stored in cache (according to my test, target is never stored). That's why all other requests to the same resource make one request to cache, and N requests to db for missed relations.

According to my test, all my requests act like first QueryBuilder, but must act like the second.
Really hard to reproduce this error in tests. But i'll try

@greg0ire greg0ire mentioned this pull request May 15, 2021
3 tasks
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.

3 participants
0