Doctrine Project

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Doctrine MongoDB ODM
  • Doctrine MongoDB ODM
  • MODM-134

Reference added twice

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0.0BETA3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

I have a listener who listens on onFlush event,
i have a document and change a property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.

Here's my document (notice references added twice on children property):

array (
'children' =>
array (
0 =>
array (
'$ref' => 'block',
'$id' => new MongoId("4d8b663638b6180803000005"),
'$db' => 'app_jules',
'_doctrine_class_name' => 'Design\\PageBundle\\Document
StrategyBlock',
),
1 =>
array (
'$ref' => 'block',
'$id' => new MongoId("4d8b663638b6180803000005"),
'$db' => 'app_jules',
'_doctrine_class_name' => 'Design\\PageBundle\\Document
StrategyBlock',
)
),
'order' => 0,
'parent' =>
array (
'$ref' => 'block',
'$id' => new MongoId("4d8b663638b6180803000003"),
'$db' => 'app_jules',
'_doctrine_class_name' => 'Design\\PageBundle\\Document
ContainerBlock',
),
'type' => 'container',
)

EDIT: if i clear() the $children ArrayCollection before calling $uow->recomputeSingleDocumentChangeSet() all is fine

I tried to reproduce it in a test-case but the result wasn't successful

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
  • Source
jules b made changes - 24/Mar/11 4:38 PM
Field Original Value New Value
Description I have a document and a listener who listens on loadClassMetadata event for this document.

When i persist it, all references are added twice (with the same id).
If i remove my listener all went fine.

array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
I have a listener who listens on onFlush event, i change the sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice (with the same id).

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):

array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
jules b made changes - 24/Mar/11 4:38 PM
Description I have a listener who listens on onFlush event, i change the sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice (with the same id).

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):

array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
I have a listener who listens on onFlush event, i change the sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice (with the same id).

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):
[CODE]
array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)[/CODE]
jules b made changes - 24/Mar/11 4:40 PM
Description I have a listener who listens on onFlush event, i change the sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice (with the same id).

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):
[CODE]
array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)[/CODE]
I have a listener who listens on onFlush event, i change the sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice (with the same id).

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
jules b made changes - 24/Mar/11 4:41 PM
Description I have a listener who listens on onFlush event, i change the sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice (with the same id).

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
I have a listener who listens on onFlush event, i change the $sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice (with the same id).

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
jules b made changes - 24/Mar/11 4:41 PM
Description I have a listener who listens on onFlush event, i change the $sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice (with the same id).

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
I have a listener who listens on onFlush event, i change the $sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
jules b made changes - 24/Mar/11 4:42 PM
Description I have a listener who listens on onFlush event, i change the $sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'blockData' =>
  array (
    'size' => 100,
    'align' => 'l',
  ),
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    2 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    3 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000006"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
I have a listener who listens on onFlush event, i change the $sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
jules b made changes - 24/Mar/11 4:43 PM
Description I have a listener who listens on onFlush event, i change the $sort property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
I have a listener who listens on onFlush event, i change the $order property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
jules b made changes - 25/Mar/11 12:50 PM
Description I have a listener who listens on onFlush event, i change the $order property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)
I have a listener who listens on onFlush event, i change the $order property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)


EDIT: if i clear() the $children ArrayCollection before calling $uow->recomputeSingleDocumentChangeSet() all is fine
jules b made changes - 25/Mar/11 12:52 PM
Description I have a listener who listens on onFlush event, i change the $order property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)


EDIT: if i clear() the $children ArrayCollection before calling $uow->recomputeSingleDocumentChangeSet() all is fine
I have a listener who listens on onFlush event, i change the $order property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice references added twice on children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)


EDIT: if i clear() the $children ArrayCollection before calling $uow->recomputeSingleDocumentChangeSet() all is fine
jules b made changes - 25/Mar/11 12:55 PM
Description I have a listener who listens on onFlush event, i change the $order property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice references added twice on children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)


EDIT: if i clear() the $children ArrayCollection before calling $uow->recomputeSingleDocumentChangeSet() all is fine
I have a listener who listens on onFlush event,
i have a document and change a property (integer) in it and call $uow->recomputeSingleDocumentChangeSet().
The result is that all references are added twice.

If i remove the call to $uow->recomputeSingleDocumentChangeSet() all is fine.


Here's my document (notice references added twice on children property):


array (
  'children' =>
  array (
    0 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    ),
    1 =>
    array (
      '$ref' => 'block',
      '$id' => new MongoId("4d8b663638b6180803000005"),
      '$db' => 'app_jules',
      '_doctrine_class_name' => 'Design\\PageBundle\\Document\\StrategyBlock',
    )
  ),
  'order' => 0,
  'parent' =>
  array (
    '$ref' => 'block',
    '$id' => new MongoId("4d8b663638b6180803000003"),
    '$db' => 'app_jules',
    '_doctrine_class_name' => 'Design\\PageBundle\\Document\\ContainerBlock',
  ),
  'type' => 'container',
)


EDIT: if i clear() the $children ArrayCollection before calling $uow->recomputeSingleDocumentChangeSet() all is fine

I tried to reproduce it in a test-case but the result wasn't successful
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
  • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=MODM-134, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

People

  • Assignee:
    Jonathan H. Wage
    Reporter:
    jules b
Vote (0)
Watch (0)

Dates

  • Created:
    24/Mar/11 11:47 AM
    Updated:
    25/Mar/11 12:55 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Doctrine Project. Try JIRA - bug tracking software for your team.