Skip to content
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

[DDC-3346] #1277 find one with eager loads is failing #1280

Conversation

Ocramius
Copy link
Member

Ping @scaytrase

Note that this is a first revision and needs refactoring, so please consider helping out with that if you can.

Ping @guilhermeblanco: please check the CachedPersisterContext stuff: it's dirty as heck, but that's because the persister internal generated SQL caching is inconsistent as heck too.

Resolution path for 2.4.x will be to throw an exception if there is an offset or a limit.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-3534

We use Jira to track the state of pull requests and the versions they got
included in.

@scaytrase
Copy link
Contributor

I'l try to see what can I do this weekend

$this->assertCount(2, $authors[0]->articles);
}

public function testFindWithEagerFetchAndOffsetWillNotHydrateLimitedCollection()
Copy link
Member Author

Choose a reason for hiding this comment

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

This test will fail due to a DBAL bug

@Ocramius
Copy link
Member Author

This bug does not affect 2.4.x, as the eager loading does not work with TO_MANY associations

scaytrase and others added 21 commits January 24, 2015 14:39
…e newly created `CachedPersisterContext`
…en limiting and fetch-joining to-many eager associations
…ET repository API (must not hydrate collections)
@Ocramius Ocramius force-pushed the hotfix/#1277-find-one-with-eager-loads-is-failing branch from 85c23e2 to 97ea6a7 Compare January 24, 2015 13:48
@Ocramius Ocramius self-assigned this Jan 24, 2015
Ocramius added a commit that referenced this pull request Jan 25, 2015
…er-loads-is-failing

[DDC-3346] #1277 find one with eager loads is failing
@Ocramius Ocramius merged commit 146354d into doctrine:master Jan 25, 2015
@Ocramius Ocramius deleted the hotfix/#1277-find-one-with-eager-loads-is-failing branch January 25, 2015 05:00
@lcobucci
Copy link
Member

@Ocramius the limit = null & offset = 0 is creating a query with just OFFSET and that is raising an error on PHP 5.6.5 (bundled libsqlite was updated to 3.8.7.2).

@scaytrase
Copy link
Contributor

@lcobucci this should be already fixed here
doctrine/dbal#782

@lcobucci
Copy link
Member

My mistake, sorry =)

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.

4 participants