English 中文(简体)
为什么能将这些数据装上 Sym子项目中?
原标题:Why can t load data these fixtures in Symfony2 project?

I ve在我的骨折数据组/ORM组装中设置了固定装置。 实际班级的情况如下:

use DoctrineCommonDataFixturesFixtureInterface,
    CompanyShoppingBundleEntityCategory;

class CategoryFixtures implements FixtureInterface
{
    public function load($em)
    {
        $category1 = new Category()->setName("category1");
        $category2 = new Category()->setName("category2");
        $em->persist($category1);
        $em->persist($category2);
        $em->flush();
    }
}

我不使用《摘要》基类,因为我不需要参考。 我也试图在运用理论时指明固定装置的道路:固定装置:载荷指挥。 http://symfony.com/doc/ 当前/bundles/DoctrineFixturesBundle/index.html“rel=“nofollow”>here。

最佳回答

档案名称或我的配置没有任何错误: 我只是想去做。

<?php

在我档案的顶端:-D

问题回答

暂无回答




相关问题
Loading gif for a winform

Loading gif for a winform, when i click a button i need to show loading gif then after some action it should not be displayed. I can find tutorial for web form, but am struggling to do the same for ...

How to have AJAX trigger the browser s loading indicator

I m making an ajax-enabled lab scheduling program, and some of the ajax operations aren t exactly quick. In Gmail, when you go to your inbox, send a message, etc. the browser acts like it s loading (...

Ajax: wait X seconds before load

I have a search form that show live results in a specified div (look at there Filter results with Jquery) I ve modified the script a little bit and now when a user check one of the checkboxes the ...

Re-insertion of <script> tags

Insertion of a file s tag, thus executing the file s code. Removal of the file s tag. Insertion of the same file s tag. Firebug does not seem to acknowledge and does not show the reinserted tag ...

热门标签