Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-443

Adding a Many-To-One Unidirectional mapping to help clarify Association Mapping documentation


    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-BETA2
    • Component/s: Documentation
    • Security Level: All
    • Labels:


      For one-to-one unidirectional and many-to-many unidirectional flipping the owning and inverse sides is fairly intuitive.

      However, the example given for One-To-Many Unidirectional does not lend itself to being flipped around (since you use a @ManyToMany for a One-To-Many unidirectional, and a @ManyToOne for a Many-To-One unidirectional).

      Yes, you can figure out what you are supposed to do by looking at the One-To-Many Bidirectional and tweaking it, but I think it should be more obvious than that.

      I suggest at a minimum adding an example of Many-To-One for at least unidirectional (or perhaps a note under One-To-Many suggesting how to do the inverse), but you can add bidirectional and self-referencing for consistency if you think that will be better understood.

      Probably the note is the best way to go about it; it gets the point across without potentially confusing people by having One-To-Many and Many-To-One as if they were fundamentally different things.


        There are no comments yet on this issue.


          • Assignee:
            jwage Jonathan H. Wage
            grekker Chuck Liddell
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: