[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


 Description   

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

{username}

:

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

Message:

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 Fri Jul 25 15:29:22 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.