[MODM-119] "strategy" property in @Field annotation is not recognized Created: 10/Feb/11  Updated: 11/Feb/11  Resolved: 11/Feb/11

Status: Resolved
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: 1.0.0BETA1
Fix Version/s: 1.0.0BETA2

Type: Bug Priority: Major
Reporter: Vitaliy Kaplich Assignee: Jonathan H. Wage
Resolution: Fixed Votes: 0
Labels: None
Environment:

Cent OS 5.5, PHP 5.3



 Description   

@Collection(strategy="set")
works fine

but
==========================================

@Field(type="collection", strategy="set")
causes error:
Fatal error: Uncaught exception 'BadMethodCallException' with message 'Unknown property 'strategy' on annotation 'Doctrine\ODM\MongoDB\Mapping\Field'.' in /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/Annotation.php on line 77

BadMethodCallException: Unknown property 'strategy' on annotation 'Doctrine\ODM\MongoDB\Mapping\Field'. in /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/Annotation.php on line 77

Call Stack:
0.0007 691072 1.

{main}

() /projects/tbi_doctrine/lab/doctrine/insert.php:0
0.0808 6313168 2. Doctrine\ODM\MongoDB\DocumentManager->persist() /projects/tbi_doctrine/lab/doctrine/insert.php:34
0.0809 6313168 3. Doctrine\ODM\MongoDB\UnitOfWork->persist() /projects/tbi_doctrine/vendors/doctrine/odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php:338
0.0809 6313248 4. Doctrine\ODM\MongoDB\DocumentManager->getClassMetadata() /projects/tbi_doctrine/vendors/doctrine/odm/lib/Doctrine/ODM/MongoDB/UnitOfWork.php:1177
0.0809 6313248 5. Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory->getMetadataFor() /projects/tbi_doctrine/vendors/doctrine/odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php:250
0.0809 6313248 6. Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory->loadMetadata() /projects/tbi_doctrine/vendors/doctrine/odm/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataFactory.php:165
0.0957 6734784 7. Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver->loadMetadataForClass() /projects/tbi_doctrine/vendors/doctrine/odm/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataFactory.php:221
0.0978 6669016 8. Doctrine\Common\Annotations\AnnotationReader->getPropertyAnnotation() /projects/tbi_doctrine/vendors/doctrine/odm/lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php:182
0.0978 6669016 9. Doctrine\Common\Annotations\AnnotationReader->getPropertyAnnotations() /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php:216
0.0979 6669392 10. Doctrine\Common\Annotations\Parser->parse() /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php:201
0.0983 6678712 11. Doctrine\Common\Annotations\Parser->Annotations() /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/Parser.php:209
0.0983 6678928 12. Doctrine\Common\Annotations\Parser->Annotation() /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/Parser.php:270
0.0986 6680200 13. Doctrine\Common\Annotations\Parser->newAnnotation() /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/Parser.php:349
0.0986 6680840 14. Doctrine\Common\Annotations\Annotation->__construct() /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/Parser.php:536
0.0986 6681624 15. Doctrine\Common\Annotations\Annotation->__set() /projects/tbi_doctrine/vendors/doctrine/common/lib/Doctrine/Common/Annotations/Annotation.php:0



 Comments   
Comment by Jonathan H. Wage [ 11/Feb/11 ]

Fixed here https://github.com/doctrine/mongodb-odm/commit/b9bd2dcbab3c8ea2ef537fa1301525b3004ba795

Generated at Sun Dec 21 10:04:16 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.