[DDC-1524] NamedQueries annotation doesn't work with just one NamedQuery Created: 09/Dec/11  Updated: 17/Dec/11  Resolved: 17/Dec/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Mapping Drivers
Affects Version/s: 2.1.3
Fix Version/s: 2.2
Security Level: All

Type: Bug Priority: Major
Reporter: Thiago Luiz Alves Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Attachments: File AnnotationDriver.php    

 Description   

NamedQueries annotation doesn't work with just one NamedQuery

the problem is locale in the class Doctrine\ORM\Mapping\Driver\AnnotationDriver line 179.

Is needed validate if var $namedQueriesAnnot->value is an array before try perform foreach statement.

Please I'm sorry for my bad English.

Thank you



 Comments   
Comment by Benjamin Eberlei [ 15/Dec/11 ]

Why dont you define the named queries as array? just @NamedQuery(

{...}

) ?

Also please consider attaching a diff of your patch, not the whole changed class.

Comment by Benjamin Eberlei [ 17/Dec/11 ]

Added better validations.

Generated at Fri Oct 31 17:16:59 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.