[PHPCR-70] ContentDocument Relationships returning NULL in Action Created: 06/Jun/12 Updated: 21/Jul/12 Resolved: 21/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine PHPCR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Freddy H. | Assignee: | Lukas Kahwe |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
So i have 2 Documents: Page: http://pastebin.com/b5X32JPc Category: http://pastebin.com/A1gB6kyg A Category has many pages. Now here's my (test) action: http://pastebin.com/ypjxqZPu As you can see, $contentDocument is a page in this case. If i call $contentDocument->category i get back "null". If however i tell the document manager to fetch the Page document by it's path, then $contentDocument->category will work... Our conclusion is that if you take the $contentDocument that is passed to your action, and you try to fetch it's ParentDocument inside the action (mapped to a property) you always get null. |
| Comments |
| Comment by David Buchmann [ 06/Jun/12 ] |
|
this might be a bug of combining reference with parent. [23:06] <dbu> look at vendor/doctrine/phpcr-odm/tests/Doctrine/Tests/ODM/PHPCR/Functional/HierarchyTest.php |
| Comment by Lukas Kahwe [ 21/Jul/12 ] |
|
i have managed to reproduce the bug .. i am looking into fixing it now. |
| Comment by Lukas Kahwe [ 21/Jul/12 ] |
|
fixed in master |