}
// create items that are defined as auto-created by the new primary node
// type and at the same time were not present with the old nt
for (Iterator iter = addedDefs.iterator(); iter.hasNext();) {
ItemDef def = (ItemDef) iter.next();
if (def.isAutoCreated()) {
if (def.definesNode()) {
NodeDefinitionImpl ndi = ntMgr.getNodeDefinition((NodeDef) def);
createChildNode(ndi.getQName(), (NodeTypeImpl) ndi.getDefaultPrimaryType(), null);
} else {
PropertyDefinitionImpl pdi = ntMgr.getPropertyDefinition((PropDef) def);
createChildProperty(pdi.getQName(), pdi.getRequiredType(), pdi);