Index: src/main/java/info/magnolia/cms/core/version/ContentVersion.java =================================================================== --- src/main/java/info/magnolia/cms/core/version/ContentVersion.java (revision 36929) +++ src/main/java/info/magnolia/cms/core/version/ContentVersion.java (working copy) @@ -55,6 +55,7 @@ import java.util.List; import javax.jcr.PathNotFoundException; +import javax.jcr.PropertyType; import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.Workspace; @@ -633,5 +634,37 @@ public Workspace getWorkspace() throws RepositoryException { return this.base.getWorkspace(); } + + @Override + public boolean hasNodeData(String name) throws RepositoryException { + if (this.node.hasProperty(name)) { + return true; + } + else { // check for mgnl:resource node + if (this.node.hasNode(name) && this.node.getNode(name).getProperty("jcr:frozenPrimaryType").getValue().getString().equals(ItemType.NT_RESOURCE)) { + return true; + } + } + return false; + } + + @Override + protected int determineNodeDataType(String name) { + // FIXME: maybe delegate to NodeDataImplementations? + try { + if (this.node.hasProperty(name)) { + return this.node.getProperty(name).getType(); + } + else { // check for mgnl:resource node + if (this.node.hasNode(name) && this.node.getNode(name).getProperty("jcr:frozenPrimaryType").getValue().getString().equals(ItemType.NT_RESOURCE)) { + return PropertyType.BINARY; + } + } + } + catch (RepositoryException e) { + throw new IllegalStateException("Can't determine property type of [" + getHandle() + "/" + name + "]", e); + } + return PropertyType.UNDEFINED; + } } Index: src/main/java/info/magnolia/cms/core/DefaultContent.java =================================================================== --- src/main/java/info/magnolia/cms/core/DefaultContent.java (revision 36929) +++ src/main/java/info/magnolia/cms/core/DefaultContent.java (working copy) @@ -203,7 +203,7 @@ return true; } else { // check for mgnl:resource node - if (this.node.hasNode(name) && this.node.getNode(name).isNodeType(ItemType.NT_RESOURCE)) { + if (this.node.hasNode(name) && (this.node.getNode(name).isNodeType(ItemType.NT_RESOURCE) || (this.node.hasProperty("jcr:frozenPrimaryType") && this.node.getNode(name).getProperty("jcr:frozenPrimaryType").getValue().getString().equals(ItemType.NT_RESOURCE)))) { return true; } } @@ -243,7 +243,7 @@ return this.node.getProperty(name).getType(); } else { // check for mgnl:resource node - if (this.node.hasNode(name) && this.node.getNode(name).isNodeType(ItemType.NT_RESOURCE)) { + if (this.node.hasNode(name) && (this.node.getNode(name).isNodeType(ItemType.NT_RESOURCE) || (this.node.getNode(name).hasProperty("jcr:frozenPrimaryType") && this.node.getNode(name).getProperty("jcr:frozenPrimaryType").getValue().getString().equals(ItemType.NT_RESOURCE)))) { return PropertyType.BINARY; } }