DDC-1524: NamedQueries annotation doesn't work with just one NamedQuery #1911

Closed
opened 2026-01-22 13:30:39 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 9, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user thiagojfg:

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

Originally created by @doctrinebot on GitHub (Dec 9, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user thiagojfg: 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
admin added the Bug label 2026-01-22 13:30:39 +01:00
admin closed this issue 2026-01-22 13:30:41 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 15, 2011):

Comment created by @beberlei:

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.

@doctrinebot commented on GitHub (Dec 15, 2011): Comment created by @beberlei: 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.
Author
Owner

@doctrinebot commented on GitHub (Dec 17, 2011):

Comment created by @beberlei:

Added better validations.

@doctrinebot commented on GitHub (Dec 17, 2011): Comment created by @beberlei: Added better validations.
Author
Owner

@doctrinebot commented on GitHub (Dec 17, 2011):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Dec 17, 2011): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 1 attachments from Jira into https://gist.github.com/05bf6495725b5bdf6d2f

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 1 attachments from Jira into https://gist.github.com/05bf6495725b5bdf6d2f - [11126_AnnotationDriver.php](https://gist.github.com/05bf6495725b5bdf6d2f#file-11126_AnnotationDriver-php)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1911