[PHPCR-80] ChildrenCollection is not updated after flush although children where added before Created: 07/Sep/12 Updated: 12/Mar/13 |
|
| Status: | Open |
| Project: | Doctrine PHPCR |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Uwe Jäger | Assignee: | Lukas Kahwe |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
If you create children of a document without adding them to the children collection of the parent (with a children annotation) the children collection is not updated after flush, you need to call $dm->clear() to force a reread of the children. The current case was with a parent and its children created in the same flush. |
| Comments |
| Comment by Uwe Jäger [ 07/Sep/12 ] |
|
Try this code: $node1 = new Generic(); $this->childrenNames = array('first', 'second', 'third', 'fourth'); $this->dm->flush(); $node = $this->dm->find(null, '/functional/source'); // without the clear above $children === NULL, with the clear it works as expected |
| Comment by David Buchmann [ 14/Jan/13 ] |
|
lukas, is this fixed with the work you did on cascading? |
| Comment by David Buchmann [ 12/Mar/13 ] |
|
we did a lot of refactoring on cascading lately. uwe, can you check if the problem still exists and do a pull request with a failing test if it exists? |