Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.0ALPHA2
-
Fix Version/s: 1.0.0BETA1
-
Component/s: Hydration
-
Labels:None
-
Environment:Windows(webserver) / Unix (Mongo)
Description
When you try to find or execute query, filds with annotation reference many (arrays) do not load.
Example:
user.php
<?php /** * @Document(db="DB", collection="Users") */ class User { /** * @Id */ public $id; /** * @String */ public $name; /** * @String */ public $password; /** * @String */ public $email; /** * @ReferenceMany(targetDocument="Group") */ public $groups = array(); } ?>
group.php
<?php /** * @Document(db="MCI", collection="Groups") */ class Group { /** * @Id */ public $id; /** * @String */ public $name; /** * @String */ public $role_name; } ?>
When you execute this line:
$obj = $this->dm->findOne("User",("name" => "Flavio"));
All the fields are returned correctly, but "groups" apear empty.
When you use @EmbedMany annotation works file.
Regards.
PS: I'm using codeigniter framework
-
Hide
- test.zip
- 06/Aug/10 10:23 PM
- 397 kB
- Flavio Lacerda
-
- test/.DS_Store 6 kB
- __MACOSX/test/._.DS_Store 0.1 kB
- test/database.php 1.0 kB
- test/doc/group.php 0.2 kB
- test/doc/user.php 0.4 kB
- test/doctrine/.DS_Store 6 kB
- __MACOSX/test/doctrine/._.DS_Store 0.1 kB
- test/doctrine/.svn/all-wcprops 0.1 kB
- test/doctrine/.svn/entries 0.2 kB
- test/doctrine/Common/.svn/all-wcprops 1 kB
- test/doctrine/Common/.svn/entries 2 kB
- test/doctrine/.../ClassLoader.php.svn-base 8 kB
- test/.../CommonException.php.svn-base 0.2 kB
- test/doctrine/.../EventArgs.php.svn-base 3 kB
- test/doctrine/.../EventManager.php.svn-base 5 kB
- test/.../EventSubscriber.php.svn-base 2 kB
- test/doctrine/.../Lexer.php.svn-base 7 kB
- test/.../NotifyPropertyChanged.php.svn-base 2 kB
- test/.../PropertyChangedListener.php.svn-base 2 kB
- test/doctrine/.../Version.php.svn-base 2 kB
- test/doctrine/Common/.../.svn/all-wcprops 0.7 kB
- test/doctrine/Common/.../.svn/entries 1.0 kB
- test/doctrine/.../Annotation.php.svn-base 2 kB
- test/.../AnnotationException.php.svn-base 2 kB
- test/.../AnnotationReader.php.svn-base 8 kB
- test/doctrine/.../Lexer.php.svn-base 4 kB
- test/doctrine/.../Parser.php.svn-base 13 kB
- test/doctrine/.../Annotations/Annotation.php 2 kB
- test/doctrine/.../AnnotationException.php 2 kB
- test/doctrine/.../AnnotationReader.php 8 kB
-
- screenshot-script.jpg
- 209 kB
- 06/Aug/10 10:25 PM
Activity
Show
Flavio Lacerda
added a comment - I created an script.
Took a picture of output script too.
Hide
Jonathan H. Wage
added a comment -
Show
Jonathan H. Wage
added a comment - http://github.com/doctrine/mongodb-odm/commit/cbe22dfd50225250ab468ea2f5e243736b2f35fd
Hide
Flavio Lacerda
added a comment -
Now works perfect. I´m using it a lot. Amazing lib and amazing support.
Show
Flavio Lacerda
added a comment - Now works perfect. I´m using it a lot. Amazing lib and amazing support.
This works for me. Can you provide a more exact test case that does not work?