diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53cc0b86..fb582698 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,8 @@ Changelog
* **2017-02-10**: [BC BREAK] Removed the `ImagineBlock` as the CmfMediaBundle
is abandoned.
+ * **2017-02-09**: [BC BREAK] Added child restrictions to the block documents.
+ See the UPGRADE guide for detailed information.
2.0.0-RC1
---------
diff --git a/UPGRADE-2.0.md b/UPGRADE-2.0.md
index b10fc21b..eae56a90 100644
--- a/UPGRADE-2.0.md
+++ b/UPGRADE-2.0.md
@@ -1,6 +1,6 @@
# Upgrade from 1.x to 2.0
-## Sonata Admin
+### Sonata Admin
* The SonataAdminBundle integration has been moved to
`symfony-cmf/sonata-admin-integration-bundle`. This includes the classes in
@@ -66,3 +66,14 @@
* The `ImagineBlock` was removed from this bundle as the CmfMediaBundle is
abandoned. Implement the block in your own application if you were using it.
+
+### Doctrine PHPCR ODM
+
+ * It is no longer possible to add a child to the `ActionBlock`,
+ `ImagineBlock`, `MenuBlock`, `ReferenceBlock`, `RssBlock`, `SimpleBlock` and
+ `StringBlock` documents. This behaviour can be changed by overriding the
+ `child-class` setting of the PHPCR ODM mapping.
+
+ * Only instances of sonata's `BlockInterface` are allowed as children of the
+ `ContainerBlock` and `SlideshowBlock` documents. This behaviour can be changed
+ by overriding the `child-class` setting of the PHPCR ODM mapping.
diff --git a/composer.json b/composer.json
index 95d9c15e..6b5aeb3a 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,7 @@
"php": "^5.6|^7.0",
"symfony/framework-bundle": "^2.8|^3.0",
"doctrine/phpcr-bundle" :"^1.0",
- "doctrine/phpcr-odm": "^1.4|^2.0",
+ "doctrine/phpcr-odm": "^1.4.2",
"sonata-project/block-bundle": "^3.3",
"symfony-cmf/core-bundle": "^2.0"
},
diff --git a/src/Resources/config/doctrine-phpcr/ActionBlock.phpcr.xml b/src/Resources/config/doctrine-phpcr/ActionBlock.phpcr.xml
index 6d998bc1..a125adbb 100644
--- a/src/Resources/config/doctrine-phpcr/ActionBlock.phpcr.xml
+++ b/src/Resources/config/doctrine-phpcr/ActionBlock.phpcr.xml
@@ -8,6 +8,7 @@
diff --git a/src/Resources/config/doctrine-phpcr/ContainerBlock.phpcr.xml b/src/Resources/config/doctrine-phpcr/ContainerBlock.phpcr.xml
index c1fd27b9..1d68f4f3 100644
--- a/src/Resources/config/doctrine-phpcr/ContainerBlock.phpcr.xml
+++ b/src/Resources/config/doctrine-phpcr/ContainerBlock.phpcr.xml
@@ -16,6 +16,8 @@
+
+
diff --git a/src/Resources/config/doctrine-phpcr/MenuBlock.phpcr.xml b/src/Resources/config/doctrine-phpcr/MenuBlock.phpcr.xml
index 03e5f546..18ca3dba 100644
--- a/src/Resources/config/doctrine-phpcr/MenuBlock.phpcr.xml
+++ b/src/Resources/config/doctrine-phpcr/MenuBlock.phpcr.xml
@@ -9,6 +9,7 @@
name="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\MenuBlock"
referenceable="true"
property="blockMenu"
+ is-leaf="true"
>
diff --git a/src/Resources/config/doctrine-phpcr/ReferenceBlock.phpcr.xml b/src/Resources/config/doctrine-phpcr/ReferenceBlock.phpcr.xml
index 0254bdb1..77b95239 100644
--- a/src/Resources/config/doctrine-phpcr/ReferenceBlock.phpcr.xml
+++ b/src/Resources/config/doctrine-phpcr/ReferenceBlock.phpcr.xml
@@ -8,6 +8,7 @@
diff --git a/src/Resources/config/doctrine-phpcr/RssBlock.phpcr.xml b/src/Resources/config/doctrine-phpcr/RssBlock.phpcr.xml
index 710d9741..0a3d2ef8 100644
--- a/src/Resources/config/doctrine-phpcr/RssBlock.phpcr.xml
+++ b/src/Resources/config/doctrine-phpcr/RssBlock.phpcr.xml
@@ -8,6 +8,7 @@
diff --git a/src/Resources/config/doctrine-phpcr/SimpleBlock.phpcr.xml b/src/Resources/config/doctrine-phpcr/SimpleBlock.phpcr.xml
index 206ef0c0..33e854c5 100644
--- a/src/Resources/config/doctrine-phpcr/SimpleBlock.phpcr.xml
+++ b/src/Resources/config/doctrine-phpcr/SimpleBlock.phpcr.xml
@@ -9,6 +9,7 @@
name="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock"
referenceable="true"
translator="attribute"
+ is-leaf="true"
>
diff --git a/src/Resources/config/doctrine-phpcr/SlideshowBlock.phpcr.xml b/src/Resources/config/doctrine-phpcr/SlideshowBlock.phpcr.xml
index 47e92f72..f8c4d33b 100644
--- a/src/Resources/config/doctrine-phpcr/SlideshowBlock.phpcr.xml
+++ b/src/Resources/config/doctrine-phpcr/SlideshowBlock.phpcr.xml
@@ -15,6 +15,8 @@
+
+
diff --git a/src/Resources/config/doctrine-phpcr/StringBlock.phpcr.xml b/src/Resources/config/doctrine-phpcr/StringBlock.phpcr.xml
index c4433a8d..7c255a9d 100644
--- a/src/Resources/config/doctrine-phpcr/StringBlock.phpcr.xml
+++ b/src/Resources/config/doctrine-phpcr/StringBlock.phpcr.xml
@@ -9,6 +9,7 @@
name="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\StringBlock"
referenceable="true"
translator="attribute"
+ is-leaf="true"
>