diff --git a/src/Kunstmaan/GeneratorBundle/Generator/PageGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/PageGenerator.php index c899511381..54edcb6df0 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/PageGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/PageGenerator.php @@ -116,7 +116,7 @@ function ($val) { $this->sections ), 'adminType' => '\\' . $this->bundle->getNamespace() . '\\Form\\Pages\\' . $this->entity . 'AdminType', - 'namespace' => $this->registry->getEntityNamespace($this->bundle->getName()) . '\\Pages\\' . $this->entity + 'namespace' => $this->registry->getAliasNamespace($this->bundle->getName()) . '\\Pages\\' . $this->entity ); $extraCode = $this->render('/Entity/Pages/ExtraFunctions.php', $params); diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/OverviewPage.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/OverviewPage.php index c529d95553..e8a06fe11a 100755 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/OverviewPage.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/OverviewPage.php @@ -15,7 +15,7 @@ * The article overview page which shows its articles * * @ORM\Entity(repositoryClass="{{ namespace }}\Repository\{{ entity_class }}\{{ entity_class }}OverviewPageRepository") - * @ORM\Table(name="{{ prefix }}{{ entity_class|lower }}overviewpages") + * @ORM\Table(name="{{ prefix }}{{ entity_class|lower }}_overviewpages") */ class {{ entity_class }}OverviewPage extends AbstractArticleOverviewPage { diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/Page.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/Page.php index 86d38a9be5..c4026536c4 100755 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/Page.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/Page.php @@ -11,7 +11,7 @@ /** * @ORM\Entity(repositoryClass="{{ namespace }}\Repository\{{ entity_class }}\{{ entity_class }}PageRepository") - * @ORM\Table(name="{{ prefix }}{{ entity_class|lower }}pages") + * @ORM\Table(name="{{ prefix }}{{ entity_class|lower }}_pages") * @ORM\HasLifecycleCallbacks */ class {{ entity_class }}Page extends AbstractArticlePage diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Repository/PageRepository.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Repository/PageRepository.php index 0c0186aaa9..24fb794ab6 100755 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Repository/PageRepository.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Repository/PageRepository.php @@ -2,6 +2,7 @@ namespace {{ namespace }}\Repository\{{ entity_class }}; +use Doctrine\ORM\Query; use Doctrine\ORM\Query\ResultSetMappingBuilder; use Kunstmaan\ArticleBundle\Repository\AbstractArticlePageRepository; @@ -44,7 +45,7 @@ public function getArticlesQuery($lang = null, $offset, $limit) $query = "SELECT"; $query .= " article.*"; $query .= " FROM"; - $query .= " {{ prefix }}{{ entity_class|lower }}pages as article"; + $query .= " {{ prefix }}{{ entity_class|lower }}_pages as article"; $query .= " INNER JOIN"; $query .= " kuma_node_versions nv ON nv.ref_id = article.id"; $query .= " INNER JOIN";