jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Flórez (Jira) <j...@apache.org>
Subject [jira] [Updated] (OAK-8961) Insertion of property definitions with the same name
Date Fri, 19 Jun 2020 12:02:00 GMT

     [ https://issues.apache.org/jira/browse/OAK-8961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jorge Flórez updated OAK-8961:
------------------------------
    Affects Version/s: 1.30.0

> Insertion of property definitions with the same name
> ----------------------------------------------------
>
>                 Key: OAK-8961
>                 URL: https://issues.apache.org/jira/browse/OAK-8961
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>    Affects Versions: 1.12.0, 1.30.0
>            Reporter: Jorge Flórez
>            Priority: Major
>         Attachments: multiple nodes.png
>
>
> Tested on version 1.12.0.
> Invoking the following code multiple times (it inserts a new property into an existing
node type)
> NodeTypeManager nodeTypeManager =
>  session.getWorkspace().getNodeTypeManager();
> NodeType repositoryType = nodeTypeManager.getNodeType("testType");
>  NodeTypeTemplate repositoryTypeTemplate =
>  nodeTypeManager.createNodeTypeTemplate(repositoryType);
>  PropertyDefinitionTemplate testProperty =
>  nodeTypeManager.createPropertyDefinitionTemplate();
>  testProperty.setName("testProperty");
>  testProperty.setRequiredType(PropertyType.STRING);
>  testProperty.setMandatory(false);
>  testProperty.setMultiple(false);
>  testProperty.setDefaultValues(new Value[0]);
>  testProperty.setValueConstraints(new String[0]);
>  repositoryTypeTemplate.getPropertyDefinitionTemplates().add(testProperty);
> nodeTypeManager.registerNodeType(repositoryTypeTemplate, true);
>  session.save();
> results in the node type having multiple jcr:propertyDefinition nodes with the same
name in the node type. For example:
> !multiple nodes.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message