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

Refinements for content fetching #5401

Merged

Conversation

rossriley
Copy link
Contributor

@rossriley rossriley commented Jun 2, 2016

This implements the missing named record select in the new storage engine.

It includes the intelligence to drop into single record mode where appropriate and thus means the following queries will all work correctly.

$page = $app['query']->getContent('pages/2'); // returns a single page with an id of 2

$page = $app['query']->getContent('pages/lorem-ipsum'); // returns a single page with aslug of 'lorem-ipsum'

$pages = $app['query']->getContent('pages,entries/2'); // returns multiple records where id is 2

Fixes: #5395

There's also corresponding test updates to reflect these changes, which should have no BC implications since it was functionality that was not correctly implemented before.

@rossriley rossriley changed the title Refinements for content searching Refinements for content fetching Jun 2, 2016
} else {
$contentQuery->setParameter('slug', $contentQuery->getIdentifier());
}
if(count($contentQuery->getContentTypes()) === 1) {

Choose a reason for hiding this comment

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

Expected 1 space after IF keyword; 0 found

@GwendolenLynch
Copy link
Contributor

There's also corresponding test updates to reflect these changes

^ this 👍 😄

@GwendolenLynch GwendolenLynch merged commit b004599 into bolt:release/3.0 Jun 2, 2016
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