Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2667

Collections for OneToMany&ManyToMany relations generated by entity's repository

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:

      Description

      The ArrayCollection object for OneToMany or ManyToMany relations is
      generated by Doctrine. There is no ability within entity to get acces to it's repository.

      This would be very useful nice to specify additionally the method in entity's repository, which could generate collection for the given entity.

      An example annotation
      /** @ORM\OneToMany(targetEntity="Person", repositoryMethod="findAllowedPersons") */
      private $persons;

      Advantages

      • optimized query for collection (or even php script)
      • generation of collections can depends on external parameters or internal fields

      Problems

      • for such collections adding/removing of elements is not allowed or has be limited

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Vladimir Schmidt
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: