[CODM-37] Github-PR-22 by marnusw: Fixed Document annotation identification bug Created: 25/Aug/11  Updated: 25/Aug/11

Status: Open
Project: Doctrine CouchDB ODM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


This issue is created automatically through a Github pull request on behalf of



Url: https://github.com/doctrine/couchdb-odm/pull/22


In AnnotationDriver#loadMetadataForClass() it was incorrectly assumed that an array of annotations indexed by annotation name was returned; in fact a numerically indexed array is received. This patch fixes the identification of the annotations that are present.

Since only one Document realted annotation should be present the method now also throws an exception if more than one is found. (One could just use the first annotation, but this may cause confusion when debugging.)

Not sure if this was the only outstanding problem related to issue CODM-28 but I think it was related.

Generated at Thu Oct 08 14:22:46 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.