0

I'm using Doctrine2 with codeIgniter, I've created some models in yml format. Using command line I've created the Proxies and Entities. When I'm trying to create the database tables, I'm getting the following error:

[Doctrine\ORM\Mapping\MappingException]
Invalid mapping file 'Entities.category.dcm.yml' for class 'Entities\category'.

Here's Entities.category.dcm.yml:

Entities\Category:
  type: entity
  table: categories
  fields:
    id:
      type: integer
      id: true
      generator:
        strategy: AUTO
    name:
      type: string
      length: 50
      nullable: false
    description:
      type: string
      length: 255
Elnur Abdurrakhimov
  • 44,533
  • 10
  • 148
  • 133
Bagbyte
  • 845
  • 2
  • 18
  • 34

1 Answers1

0

First of all, check the paths configured for your entities and for the YML mapping driver.

Also, your Entities.category.dcm.yml contains mappings for Entities\Category, and not Entities\category.

As you can see in the base FileDriver Doctrine ORM does direct matching for mapped classes, and applies no normalization on the class names. Category and category are therefore different.

Ocramius
  • 25,171
  • 7
  • 103
  • 107