Sylva i have de same issue...can you help me? segunda-feira, 4 de Abril de 2011 às 23:16:35 UTC+1, Sylva escreveu: > > Just looking at this issue again. Has the fix made its way to the zip > package available at github or does it live in the master branch? > > On Mar 23, 8:15 pm, Jonathan Wage <[email protected]> wrote: > > Hi, > > > > This notice is fixed now. It was a problem that did not exist for the > > annotation driver. > > > > - Jon > > > > > > > > > > > > > > > > > > > > On Tue, Mar 22, 2011 at 8:56 AM, Sylva <[email protected]> wrote: > > > Currently running Doctrine ODM v1.0.0BETA3 and have basic mapping set > > > up > > > > > //.. users > > > App\Documents\User: > > > collection: users > > > type: document > > > > > referenceOne: > > > _account: > > > targetDocument: App\Documents\Account > > > > > // .. accounts > > > App\Documents\Account: > > > collection: accounts > > > type: document > > > repositoryClass: App\Documents\Repository\AccountRepository > > > > > referenceMany: > > > _users: > > > targetDocument: App\Documents\User > > > cascade: all > > > > > Data In DB looks like this (accounts)... > > > > > { > > > "_id": ObjectId("4d6936b875a295297600000a"), > > > "account_name": "Foo", > > > "created": "Tue, 22 Mar 2011 12:08:52 +0000", > > > "expires": "Fri, 22 Apr 2011 11:08:52 +0000", > > > "active": false, > > > "timezone": "Europe\/London", > > > "locale": "en_GB", > > > "password": "da5222cee832a5df3d93a78f04212bd1ddcfdd83", > > > "_address": { > > > "line_1": "", > > > "line_2": "", > > > "city": "", > > > "region": "", > > > "area_code": "", > > > "country": "United Kingdom" > > > }, > > > "email": "[email protected]", > > > "telephone": "012315635", > > > "_logo": { > > > "image": "<Mongo Binary Data>", > > > "content-type": "image\/png", > > > "file_size": "", > > > "width": 400, > > > "height": 150 > > > }, > > > "_users": [ > > > { > > > "$ref": "users", > > > "$id": ObjectId("4d6936b875a2952976000005") > > > }, > > > { > > > "$ref": "users", > > > "$id": ObjectId("4d6936b875a2952976000007") > > > } > > > ], > > > "_package": { > > > "$ref": "packages", > > > "$id": ObjectId("4d6936b875a295297600000c") > > > } > > > } > > > > > Now if I call the account and then call get users I get an instance of > > > Doctrine\ODM\MongoDB\PersistentCollection; > > > > > $account = $dm->find('App\Documents\Account', > > > '4d6936b875a295297600000a'); > > > $account->getUsers(); // instance of Doctrine\ODM\MongoDB > > > \PersistentCollection > > > > > Now to verify user count; > > > > > $account->getUsers()->count(); // returns 2 - this is correct > > > > > However any of these gives the same error; > > > > > $account->getUsers()->toArray(); > > > $account->getUsers()->current(); > > > $account->getUsers()->first(); > > > > > The error message is; > > > > > Undefined index: repositoryMethod > > > > > library/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php:476 > > > library/Doctrine/ODM/MongoDB/UnitOfWork.php:2329 > > > library/Doctrine/ODM/MongoDB/PersistentCollection.php:138 > > > library/Doctrine/ODM/MongoDB/PersistentCollection.php:300 > > > library/TimeTrax/Documents/AccountTest.php:89 > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "doctrine-user" group. > > > To post to this group, send email to [email protected] > <javascript:>. > > > To unsubscribe from this group, send email to > > > [email protected] <javascript:>. > > > For more options, visit this group at > > >http://groups.google.com/group/doctrine-user?hl=en. > > > > -- > > Connect with me on *http://twitter.com/jwage*<http://twitter.com/jwage> > > andhttp://about.me/jwageto keep in touch.
-- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
