Index: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java =================================================================== --- oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java (revision 1822495) +++ oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java (working copy) @@ -502,6 +502,8 @@ } else { return null; } + } else if (!bundlingContext.hasNonBundledChildren) { + return null; } return store.getNode(concat(getPath(), childNodeName), lastRevision); Index: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java =================================================================== --- oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java (revision 1822496) +++ oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java (working copy) @@ -61,7 +61,6 @@ import org.apache.jackrabbit.oak.spi.state.NodeStateUtils; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; @@ -448,7 +447,6 @@ assertEquals(1, ds.queryPaths.size()); } - @Ignore("OAK-7213") @Test public void hasChildren_BundledRoot_NoNonBundledChild() throws Exception { createTestNode("/test/book.jpg", createChild(newNode("app:Asset")).getNodeState());