I want to help re-write a paragraph in the tutorial to clarify it. But I don't quite understand it yet. I'm not a database expert, and I suspect many Doctrine users like me are being exposed to some concepts for the first time through Doctrine's docs.
Here's the paragraph: Here are some new things to mention about the one-to-many tags. Remember > that we discussed about the inverse and owning side. Now both reportedBugs > and assignedBugs are inverse relations, which means the join details have > already been defined on the owning side. Therefore we only have to specify > the property on the Bug class that holds the owning sides. > I'm not sure what the point of this paragraph is. Facts we have at this point: 1. The entity on the Many side of a one-to-many relationship is considered the owner because it has a field with a foreign key pointing to the One side. This is the field that has a @ManyToOne tag. 2. The One side in one-to-many relationship is the considered the *inverse* entity. This is the side that has a @OneToMany tag. It's required to have "targetEntity" and "mappedBy" attributes to tell Doctrine the name of the other side (owning entity) and which field on the owning entity holds the foreign key pointing to the One side. So, breaking down the paragraph: Now both reportedBugs and assignedBugs are inverse relations, which means > the join details have already been defined on the owning side. > Why does the fact that they are inverse relations mean the join details have already been defined on the owning side? How have the join details been defined? Therefore we only have to specify the property on the Bug class that holds > the owning sides. > I think this is meant to say Therefore, on the User class, we only have to specify the owning side > (targetEntity="Bug") and property which holds the key pointing back at us > (mappedBy="reporter" and "engineer"). > How far off am I? -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
