[DDC-2736] Error generating annotations of index in Entities Created: 11/Oct/13  Updated: 16/Apr/14  Resolved: 16/Apr/14

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.3.4
Fix Version/s: 2.3.4
Security Level: All

Type: Bug Priority: Minor
Reporter: Cesar Gutierrez Tineo Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None
Environment:

Ubuntu 12.04, PHP 5.3.10


Attachments: File bootstrap.php     File Opportunities.php    

 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.



 Comments   
Comment by Marco Pivetta [ 17/Oct/13 ]

Can you provide the entire generated file as an attachment?

Comment by Cesar Gutierrez Tineo [ 17/Oct/13 ]

Generated class.

Comment by Cesar Gutierrez Tineo [ 17/Oct/13 ]

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

Comment by Marco Pivetta [ 17/Oct/13 ]

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

Comment by Cesar Gutierrez Tineo [ 17/Oct/13 ]

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

Comment by Marco Pivetta [ 17/Oct/13 ]

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

Comment by Cesar Gutierrez Tineo [ 17/Oct/13 ]

Ok, I'll try. I use 2.2.1.

Comment by Guilherme Blanco [ 16/Apr/14 ]

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

Generated at Sat Dec 20 10:32:47 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.