Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-391

Allow to specifiy custom Entity and Collection Persister classes

    Details

    • Type: New Feature New Feature
    • Status: In Progress
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0-ALPHA4
    • Fix Version/s: 2.x
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      It should be allowed to overwrite the default persisters for collections and entities. This should go along the lines of Hibernate which allows to set the custom implementations like:

      XML:

      <entity persister="persisterClass" />
      <OneToMany persister="persisterClass" />
      

      Annotation

      /**
       * @Entity(persister="persisterClass")
       * @OneToMany(persister="persisterClass")
       */
      

        Issue Links

          Activity

          Hide
          Guilherme Blanco added a comment -

          @Adam I refactored all Persisters optimizing their code, but I could not complete the move from SQL string generation to Doctrine\DBAL\Query.
          We missed it, yes. I may reschedule for 2.3

          Show
          Guilherme Blanco added a comment - @Adam I refactored all Persisters optimizing their code, but I could not complete the move from SQL string generation to Doctrine\DBAL\Query. We missed it, yes. I may reschedule for 2.3
          Hide
          Thomas Rothe added a comment -

          Why is it still missing in 2.3? I would require this for an extension that uses its own overridden entity persister and using a custom persister is the solution that you guys recomend for not overriding the entity manager.

          Show
          Thomas Rothe added a comment - Why is it still missing in 2.3? I would require this for an extension that uses its own overridden entity persister and using a custom persister is the solution that you guys recomend for not overriding the entity manager.
          Hide
          sebastiaan stok added a comment - - edited

          Any change seeing this soon? I really need this for a security feature.

          What is making this so hard? just adding an setEntityPersister($entityName, $object) should do the trick.
          I don't need any fancy stuff, just a way to limit the fields in the SELECT list.

          Edit: OK, I'm shot I CAN NOT overwrite the entity manager as the UnitOfWork is private!
          Got any other idea?

          Show
          sebastiaan stok added a comment - - edited Any change seeing this soon? I really need this for a security feature. What is making this so hard? just adding an setEntityPersister($entityName, $object) should do the trick. I don't need any fancy stuff, just a way to limit the fields in the SELECT list. Edit: OK, I'm shot I CAN NOT overwrite the entity manager as the UnitOfWork is private! Got any other idea?
          Hide
          Stefan Kögel added a comment -

          Any chance you could add this quickly? I need this feature urgently to complete an extension using a custom persister. Thanks in advance.

          Show
          Stefan Kögel added a comment - Any chance you could add this quickly? I need this feature urgently to complete an extension using a custom persister. Thanks in advance.
          Hide
          Lennart Weijl added a comment -

          What's the status on this issue?

          Show
          Lennart Weijl added a comment - What's the status on this issue?

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Benjamin Eberlei
            • Votes:
              9 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated: