Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2736

Error generating annotations of index in Entities

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.3.4
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None
    • Environment:
      Ubuntu 12.04, PHP 5.3.10

      Description

      <?php
      //
      /**

      @ORM\Entity
      @ORM\Table(name="opportunities",indexes={@ORM\index(name="idx_opp_name", columns=

      {"name"}

      ),@ORM\index(name="idx_opp_assigned", columns=

      {"assigned_user_id"}

      )}) **/ //

      @ORM\index instead of @ORM\Index

      //
      ?>

      throw this error

      [Doctrine\Common\Annotations\AnnotationException]

      [Semantical Error] The annotation "@Doctrine\ORM\Mapping\index" in class CRM\Entity\Opportunities does not exist, or could not be auto-loaded.

      1. bootstrap.php
        2 kB
        Cesar Gutierrez Tineo
      2. Opportunities.php
        4 kB
        Cesar Gutierrez Tineo

        Activity

        Hide
        Guilherme Blanco added a comment -

        Assuming issue got resolved by 2.4 upgrade.
        Got no feedback from user.

        Show
        Guilherme Blanco added a comment - Assuming issue got resolved by 2.4 upgrade. Got no feedback from user.
        Hide
        Cesar Gutierrez Tineo added a comment -

        Ok, I'll try. I use 2.2.1.

        Show
        Cesar Gutierrez Tineo added a comment - Ok, I'll try. I use 2.2.1.
        Hide
        Marco Pivetta added a comment -

        Can you try using 2.4 for this? It looks OK in the EntityGenerator...

        Show
        Marco Pivetta added a comment - Can you try using 2.4 for this? It looks OK in the EntityGenerator...
        Hide
        Cesar Gutierrez Tineo added a comment - - edited

        i configured my bootstrap, and used " orm:generate-entities " in php bin/doctrine

        Show
        Cesar Gutierrez Tineo added a comment - - edited i configured my bootstrap, and used " orm:generate-entities " in php bin/doctrine
        Hide
        Marco Pivetta added a comment -

        Cesar Gutierrez Tineo looks like the annotations for `Index` are lowercase (`index`) - what command did you issue to generate them?

        Show
        Marco Pivetta added a comment - Cesar Gutierrez Tineo looks like the annotations for `Index` are lowercase (`index`) - what command did you issue to generate them?
        Hide
        Cesar Gutierrez Tineo added a comment - - edited

        Hi, Marco. Do I have to provide more files?

        Show
        Cesar Gutierrez Tineo added a comment - - edited Hi, Marco. Do I have to provide more files?
        Hide
        Cesar Gutierrez Tineo added a comment -

        Generated class.

        Show
        Cesar Gutierrez Tineo added a comment - Generated class.
        Hide
        Marco Pivetta added a comment -

        Can you provide the entire generated file as an attachment?

        Show
        Marco Pivetta added a comment - Can you provide the entire generated file as an attachment?

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Cesar Gutierrez Tineo
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: