php - Difficulties in the Jobeet Tutorial with Symfony2

589

I'm kinda new in symfony2, and I'm try to follow the tutorial of the jobeet. But I'm stuck in the part where "To tell Doctrine about our objects, we will create “metadata” files". In the tutorial there is the code:

    # src/Ens/JobeetBundle/Resources/config/doctrine/Category.orm.yml
    Ens\JobeetBundle\Entity\Category:
      type: entity
      table: category
      id:
        id:
          type: integer
          generator: { strategy: AUTO }
      fields:
        name:
          type: string
          length: 255
          unique: true
      oneToMany:
        jobs:
          targetEntity: Job
          mappedBy: category
        category_affiliates:
          targetEntity: CategoryAffiliate
          mappedBy: category

But what do I do with it, where do I save it, in my project? And with what extension? Can anyone help me with this. Here is the tutorial.Symfony2 jobeet tutorial

Thanks

214

Answer

Solution:

Also you may want to check out the version of the Jobeet tutorial for Symfony 2.3, it's easier to follow with the more recent Symfony version as the one you're looking over was written for Symfony 2.0.

Symbony 2.3 version of the Jobeet tutorial

360

Answer

Solution:

The first line of the code you show is a comment and indicates everything about the file:

# src/Ens/JobeetBundle/Resources/config/doctrine/Category.orm.yml

The file should be called:Category.orm.yml and should be saved in the foldersrc/Ens/JobeetBundle/Resources/config/doctrine/.

People are also looking for solutions to the problem: php - Add margin and crop marks to existing PDF

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.