Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

cannot EmbedOne a Document with ReferenceOne or ReferenceMany properties in it #103

Open
chatzipan opened this issue Feb 2, 2015 · 2 comments

Comments

@chatzipan
Copy link

Hi all. Im new in programming and couchdb-odm. I have the following problem:

I have a Document A in which I'm trying to embedOne another Document B which is already existing in my Database, and which has some ReferenceOne and ReferenceMany properties pointing at some Documents C and D respectively.

I get an error: Undefined index: parent in /vendor/doctrine/couchdb-odm/lib/Doctrine/ODM/CouchDB/Mapping/EmbeddedDocumentSerializer.php on line 84

Am I doing something wrong? Thanks in advance.

@mateusgf
Copy link

Same problem here!
Document Plan embeds one document Store
Document Store references many documents Users
Document Users references many documents Stores (User::$stores is mappedBy="users")

Both Store::$users and User::$stores are indexed by @Index.

When I create Documents Store and Users, all good.
But when I try to create Plan I get the error Undefined index: users

screen shot 2016-03-24 at 09 08 59

@ghost
Copy link

ghost commented Feb 27, 2017

Hello, I guess I have the same problem.

I wrote a temporary fix (but with code duplication) : #137

I hope this will help. ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants