Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

mention templates_by_class in tutorial #474

Merged
merged 1 commit into from
May 5, 2014
Merged

Conversation

dbu
Copy link
Member

@dbu dbu commented May 3, 2014

Q A
Doc fix? yes
New docs? yes
Applies to dev
Fixed tickets #415

$dm = $this->get('doctrine_phpcr')->getManager();
$posts = $dm->getRepository('Acme\BasicCmsBundle\Document\Post')->findAll();
$dm = $this->get('doctrine_phpcr')->getManagerForClass('AcmeBasicCmsBundle:Post');
$posts = $dm->getRepository('AcmeBasicCmsBundle:Post')->findAll();
Copy link
Member

Choose a reason for hiding this comment

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

are you sure this works with the PHPCR ODM?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, just checked in the sandbox.

i realized however that for the provided documents it does not work, because the register mappings pass does not handle the alias. i will look if i find a solution for that.

Copy link
Member Author

Choose a reason for hiding this comment

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

symfony/symfony#10853 - we would need to provide a forward compatible solution in phpcr-odm bundle, as we did for the original compiler pass.

anyways the above example works already. i think we won't get the alias for 1.1.0 as there are too many places involved.

@dbu
Copy link
Member Author

dbu commented May 4, 2014

ready to merge imho

wouterj added a commit that referenced this pull request May 5, 2014
 	mention templates_by_class in tutorial
@wouterj wouterj merged commit 2fc55bb into dev May 5, 2014
@wouterj wouterj deleted the cookbook-cms-tutorial branch May 5, 2014 11:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants