Skip to content

Ukol 2 - Milan Stanek#21

Open
mistacms wants to merge 1 commit intoczcodecamp:masterfrom
mistacms:listovani
Open

Ukol 2 - Milan Stanek#21
mistacms wants to merge 1 commit intoczcodecamp:masterfrom
mistacms:listovani

Conversation

@mistacms
Copy link
Copy Markdown

Milan Stanek - Pridanie strankovania do zoznamu po 9.

@vasekboch vasekboch changed the title Milan Stanek - strankovani seznamu po 9 Ukol 2 - Milan Stanek Oct 16, 2016

$paginator = $this->get('knp_paginator');
$em = $this->getDoctrine()->getManager();
$all = $em->getRepository(Product::class)->findAll();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tady pozor tohle ti vytáhne celou tabulku do paměti. To není zrovna efektivní. Při pár tisících položek a pár requestech ti umře jakýkoliv server. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants