See this: http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html
On Wed, Jun 29, 2011 at 12:51 AM, fernando.portal <[email protected]>wrote: > Ok, > I will see Doctrine documentation, but the part that I was asking for > an axample is without tabs, how to relate entity relations with yaml. > > On 29 jun, 00:07, Eriksen Costa <[email protected]> wrote: > > Hi there Fernando, > > > > When reading the docs in the Symfony Book, notice that a lot of code > > examples have tabs with the correct/suggested way to configure a piece of > > the framework behavior. > > > > The code example you used have tabs for yaml and xml mapping too: > http://symfony.com/doc/current/book/doctrine.html#add-mapping-informa... > > > > Also, take a look at the official Doctrine documentation. It's well > written > > too and provides extensive information about the ORM features: > http://www.doctrine-project.org/docs/orm/2.0/en/index.html > > > > Eriksen > > > > On Tue, Jun 28, 2011 at 11:52 PM, fernando.portal <[email protected] > >wrote: > > > > > > > > > > > > > > > > > > > > > Hi again, > > > I am with the chapter "Databases and Doctrine ("The Model")" of the > > > Book. > > > > > "A bundle can accept only one metadata definition format. For example, > > > it's not possible to mix YAML metadata definitions with annotated PHP > > > entity class definitions." > > > > > So... in "Entity Relationships/Associations" the examples are only > > > with php annotations for example: > > > class Product > > > { > > > // ... > > > > > /** > > > * @ORM\ManyToOne(targetEntity="Category", inversedBy="products") > > > * @ORM\JoinColumn(name="category_id", referencedColumnName="id") > > > */ > > > protected $category; > > > } > > > > > when I run the "php app/console doctrine:schema:update --force" > > > command in the Product table the category_id is not there. > > > How are the Entity Relationships done with yml??? > > > > > -- > > > If you want to report a vulnerability issue on symfony, please send it > to > > > security at symfony-project.com > > > > > You received this message because you are subscribed to the Google > > > Groups "symfony developers" group. > > > To post to this group, send email to [email protected] > > > To unsubscribe from this group, send email to > > > [email protected] > > > For more options, visit this group at > > >http://groups.google.com/group/symfony-devs?hl=en > > > > -- > > Blog:http://eriksencosta.wordpress.com > > Twitter: @eriksencosta > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/symfony-devs?hl=en > -- Blog: http://eriksencosta.wordpress.com Twitter: @eriksencosta -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
