The YAML mapping documentation for entities seems to be lacking. It doesn't explain what the different types, the different generator strategies, what mappedBy means, what types of cascade values are allowed, how to define a many-to-one relationship, and a whole lot more. Where can I find full documentation for this YAML file?
Unfortunately, the yaml format documentation for doctrine 2 is pretty limited at the moment.
Right now, the best way to figure out the yaml format is to look at the yaml driver implemetation.
Doctrine\ORM\Mapping\Driver\YamlDriver
Read through the the implementation of the loadMetadataForClass
method. That shows you what properties the driver is expecting where.
You can also look at the annotations documentation to supplement your understanding. Many of the documented field names and expected values are the same as the yaml format. For example: once you figure out @column
corresponds to the fields
element of the yaml format, the rest of the annotations documentation for that element lines up with the yaml format.
You can have look at Doctrine\Orm\Mapping\ClassMetadataInfo class located at
path/to/doctrine/library/Orm/Mapping/ClassMetadataInfo.php
In this class you can find mostly what's possible. If you read the comments carefully it will give you a better idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With