after doing php app/console doctrine:schema:create I'm getting the message "No Metadata Classes to process.".
My steps are just these:
Download sf2, create the bundle Jander/ClarBlundle and create Jander/ClarBundle/Resources/config/doctrine/Jander.ClarBundle.Entity.User.orm.dcm.yml with this content:
Jander\ClarBundle\Entity\User:
type: entity
table: user
id:
id:
type: integer
generator:
开发者_如何学Go strategy: AUTO
fields:
name:
type: string
length: 255
I don't have any problems with doctrine:database:create.
Any idea?
sf2 beta1.
Javier
The problem is the path to your YAML file. In Symfony2 beta2 (due soon), there will be a few changes made to ease use of convention, but in beta1, your entity YAML file must be in the path:
Jander/ClarBundle/Resources/config/doctrine/metadata/orm/Jander.ClarBundle.Entity.User.dcm.yml
Note the metadata/orm/
in the file path and the .dcm.yml
extension instead of .orm.yml
.
That is to say, your current setup should work after beta2 is rolled out, but for now, you still have to use longhand.
Reference from the Symfony2 blog here.
Try to clear cache:
php app/console cache:clear
This problem comes when you have something wrong in your YML / XML / Entity files. Possible reason paths or names are wrong.
精彩评论