Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1629

short namespace in targetEntity dont work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Invalid
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2.2
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      in 2.1.x this work

      /**

      • @ManyToOne(targetEntity="\Db:Cliente", cascade= {"ALL"})
        * @JoinColumn(name="cliente", referencedColumnName="telefono", nullable=false)
        * @var Db\modelo\Cliente
        */

        in 2.2 crash!

        PHP Fatal error: Uncaught exception 'Doctrine\\ORM\\Mapping
        MappingException' with message 'The target-entity Db:Cliente cannot be found in 'Lanzadora\\modelo
        Servicios#cliente'.' ....

        to use 2.2, i need update all Entities to this:

        /**
        * @ManyToOne(targetEntity="\Db\modelo\Cliente", cascade={"ALL"}

        )

      • @JoinColumn(name="cliente", referencedColumnName="telefono", nullable=false)
      • @var Db\modelo\Cliente
        */

      why it change?, is bug or planned?

      see DDC-1585 !!!

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Iti shouldnt even work in 2.1, this is invalid.

        Show
        Benjamin Eberlei added a comment - Iti shouldnt even work in 2.1, this is invalid.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Juan Enrique Escobar Robles
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: